Jump to content

How to automatically reload main page after redirected back to it


geekisthenewsexy

Recommended Posts

hi guys. i was wondering if anyone of you can help me. as stated in the subject, i want to be able to reload the main page after being redirected to it from another page. please take note that this is on one window only..

 

i am using this function on the other page:

<script language="JavaScript">
function goback()
{
 history.go(-1)
//****script to automatically reload main??****//
 }
<!--/script>
<body onload="setTimeout('goback()',5000)">

 

i am using FF v3.6.8 browser on this by the way. i figured posting my browser's version so that you will know if ever there are compatibility issues on the script, which i hope it doesn't have. thanks in advance guys. :-\

Link to comment
Share on other sites

hi guys, sorry for the delayed response. been busy with work lately.

 

anyway,

Can you not do this without needing to use JS?

uhm, sorry MrAdam i don't know any other method..is there another way?i mean i'm not really familiar with JS and all but if there is, can it effectively execute what i wanted?

 

and

How about using window.location

 

window.location="http://website.com/mainpage.html";

thanks brianlange, i'll try this one out.  :)

 

Link to comment
Share on other sites

I didn't mean specifically the same action, but rather re-thinking the flow of the application to not require a reload after 5 seconds. JavaScript like that can be really annoying from a user's point of view.

 

Firstly; why is it you need to reload the page after 5 seconds?

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.