BrainPill Posted April 5, 2019 Share Posted April 5, 2019 (edited) I want to run a piece of *.js like this: name: index1.html <html> <head> <script type="text/javascript" src="example.js"</script> </head> test </html> I can run it as a separate script. But when I call the script when placed under a virtual domain it is not working all other scripts I made work normal under the virtual domain example: this works : X:\wamp\www\index1.html this does not work: http://www.my-virtual-domain.loc/index1.html The text: test is executed on the screen in both scripts, meaning that the js script in one situation does not work. Does anybody know what causes this? Edited April 5, 2019 by BrainPill Link to comment Share on other sites More sharing options...
justsomeguy Posted April 5, 2019 Share Posted April 5, 2019 Check your browser's console for error messages. There's not a lot of information here to go off. Link to comment Share on other sites More sharing options...
BrainPill Posted April 6, 2019 Author Share Posted April 6, 2019 I checked the console error message. It was related to cross domain scripting . I solved it by moving the repository. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now