redirect - Javascript's redirection logic -


so, if have javascript function such as

function dosomething() {      alert("starting...");      window.location = "http://www.example.com";      alert("completed."); } 

why last line not work? i'm sure it's security issue, maybe i'm doing wrong.

thanks in advance.

pretty sure it's because have left page , browser doesn't run javascript pages not displayed.

to you'd need use frames or else load new page in iframe or equivalent.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -