Forum Moderators: coopster

Message Too Old, No Replies

redirect

         

andrewsmd

9:57 pm on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is it possible to have two redirects going away from your page. I don't think so but I wanted to make sure.
Let's say you have somePage.php that has a header("location: [msn.com");...] Is there anyway to redirect your user again after a timed period like 5 seconds. I don't think so since you are redirecting them away from you page, but I was just curious. Thanks,

eelixduppy

10:03 pm on Nov 12, 2008 (gmt 0)



No it won't be possible unless you have control over the content at the URL that you are redirecting to. You may, however, be able to do something with javascript with frames or pop-up windows.

andrewsmd

10:12 pm on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well I'm not a JS man, basically what I want to do is redirect or open a new page with a link I specify. It could be a pop up that would be fine. However, I would just like to close that window after a given period of time. How would I do that with JS. Thanks,

StoutFiles

10:43 pm on Nov 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Research these functions some. Should do what you want.

window.open()
window.setTimeout()
window.close()

andrewsmd

3:23 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok so I have a question for you then. I have a url that I generate with php how would I echo that into a JS window.open();
Meaning I have a function called generateURL() that returns the URL I want. How can I put the PHP url into the JS window.open(); Thanks,

StoutFiles

3:38 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



window.open("<?php generateURL() ?>", "windowname")

andrewsmd

5:03 pm on Nov 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow I feel like an idiot. Thanks,