Can anyone help me out with what I think is a .js sleep/setTimeout/pause type error?
I'm basically trying to grab variables from the url (name and email) and then include them into a 'linkout.php' redirect.
If I comment out the window.location..... line the variables show up (though directly against one another like: NameEmail ) on the page, however on the linkout.php page they're undefined.
If I manually define them (var name = "john") this passes correctly to the linkout.php page.
I'm thinking that perhaps this is a speed issue? Whereby it's redirecting so fast that it doesn't have time to grab them? If so can anyone help? Could setTimeout be used to delay by 1 second and remedy this? (not sure what this would look like).
Thanks!
I'm basically trying to grab variables from the url (name and email) and then include them into a 'linkout.php' redirect.
If I comment out the window.location..... line the variables show up (though directly against one another like: NameEmail ) on the page, however on the linkout.php page they're undefined.
If I manually define them (var name = "john") this passes correctly to the linkout.php page.
I'm thinking that perhaps this is a speed issue? Whereby it's redirecting so fast that it doesn't have time to grab them? If so can anyone help? Could setTimeout be used to delay by 1 second and remedy this? (not sure what this would look like).
Thanks!
Code:
var name = formData.display("name");
var email = formData.display("email");
window.location="linkout.php?name=" +name+ "&email=" +email;