Is it possible to load a Javascript program from an html page and then make the Javascript load another html page instead of the page the loaded the program?
+1
A:
Yes. In the javascript code:
window.location.href = "http://new.website.com/that/you/want_to_go_to.html";
chpwn
2010-01-07 06:19:00
but be aware, that this script isn't included/executed on the new page! otherwise you will get a recursive call
Andreas Niedermair
2010-01-07 06:20:43
+1
A:
You can include a .js file which has the script to set the
window.location.href = url;
Where url would be the url you wish to load.
Ravia
2010-01-07 06:19:08