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

jQuery Ajax Render Fragments OR Whole Page -

java - Simple Command Line calculator -

java - Updating variables inside labels -