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

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -