Jump to content

Redirect script to reload 'page a' with 'page b' after 5 seconds - Help Please!


Chezshire

Recommended Posts

Hello Everyone,

  I'm a novice web designer/developer who is looking for a simple javascript which will reload a page after 5 seconds more or less. I'm very much a novice with javascript and php, i know enough to be able to plug in scripts and such, but i'm not able to actually write them yet (but i'm working on those very valueable skills  ;) ). As I said i'm a novie, i'm in the second quarter of school and working on my second quarter final project which required me to find a client which i did. I've built a nice looking site in which i've done everything including designing the logo (yeah).

 

Here is the test url:

http://xpg.us/xSCC/xFinalP/dinnersforsinners/show/show.html

 

I have a small contact form iFramed in to the nav bar under the word contact that when you click on opens a small drop down that you can send a message to the cleint - when you do it displays a 'thank you notice'. I'd like to add a small javascript that will after five seconds replace that page with the the original form verse using the little link that i'm currently using to clear the thank you notice.

 

thanks for any and all help - and yes ultimately i want to revise/replace this form with a proper javascript that will do all of that once i've figured out how to do that and feel that i can deliver that to a client and guarantee satisfactory results ;)

 

thanks

-Chez

Link to comment
Share on other sites

For the time being you could just simply set a meta refresh on the page once it is submitted:

 

if($_POST){
echo '<meta http-equiv="refresh" content="5">';
}

 

That would make it so that when the page is posted it will refresh the page after 5 seconds. Because this is in an iframe it should just reload the page. Try it and let me know.

Link to comment
Share on other sites

Dumb dumb dumb dee-dumb dumb - I soooooo should have thought of that as I did another iframe project in class in which we had it refreshing every 5 or so seconds. Thank you so so much ngreenwood6, I will go try this and let you know how it worked - Thanks again and happy holidays!

-chez

Link to comment
Share on other sites

Thanks for the help!

 

The only thing that was odd was that when the refresh happened the background color seemed to drop out which i think had to do with a style sheet issue of some kind. I'm not checking all of my html and style sheets as it's the last thing to do and i'm done other then actually putting in the final content once my client has it ready (i'm a student so this is my class project which i'm told is very top notch especially for a 1st quarter student - thanks for all the help - i'm very excited about whatever I'll do next!)

 

-Chez

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.