Hold a page before redirecting it to another one.
-
What I am trying to do is to keep client on a webform where he/she stays for a while before redirecting him/her to another page. I put a sleep to a page load however page sleeps before displaying the information and redirects as soon as sleep process finishes. SO nothing can be seen? How could I come over this problem.
-
What I am trying to do is to keep client on a webform where he/she stays for a while before redirecting him/her to another page. I put a sleep to a page load however page sleeps before displaying the information and redirects as soon as sleep process finishes. SO nothing can be seen? How could I come over this problem.
You could use javascript. Set a timeout which calls a function to redirect the page. This will all happen client side and therefore you give the end user the page to view.
Ant. **I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!**- David Walliams (Little Britain)
-
You could use javascript. Set a timeout which calls a function to redirect the page. This will all happen client side and therefore you give the end user the page to view.
Ant. **I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!**- David Walliams (Little Britain)
I am sending the page to be redirected as querystring. how will I send this information to java script
-
I am sending the page to be redirected as querystring. how will I send this information to java script
You have to parse the href yourself to get the value. A quick google gave this. http://www.netlobo.com/url_query_string_javascript.html[^] I hope that helps. You can then redirect based on the parameter returned. window.location = url where url is the reutrned query string.
Ant. **I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!**- David Walliams (Little Britain)
-
You have to parse the href yourself to get the value. A quick google gave this. http://www.netlobo.com/url_query_string_javascript.html[^] I hope that helps. You can then redirect based on the parameter returned. window.location = url where url is the reutrned query string.
Ant. **I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!**- David Walliams (Little Britain)
Thanks alot... It worked