Project / Support Center
Welcome, %1$s. Please login or register. February 27, 2024, 05:54: PM
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Javascripting  |  : Page Forwarding 0 and 1 Guest are viewing this topic. « previous next »
: [1]
: Page Forwarding  ( 15984 )
admin
« : September 09, 2010, 04:58: PM »

Page Forwarding:
META for Automatic Page Forwarding

You can use <META ...> to tell the web browser to automatically move to another web page after a specified period of time..This will be very useful when you move your website to a new address. To transfer a visitor to a new URL/address, place the following line between the HEAD tags :

<META HTTP-EQUIV="refresh" CONTENT="5;URL=http://www.newurl.com">

Here we gives two pieces of information: CONTENT=5 means your browser waits for 5 seconds to reload and forward to  the new URL.

Automatic Page forwarding using Javascript

You can use a Javascript function to achieve the same task (without using the META TAG given above):

 <script type="text/javascript">
    window.location = "../index.php";
</script>

which is called by an onLoad in the BODY tag:

<BODY onLoad="setTimeout('TransferToURL()',5000)">.
« : January 24, 2023, 02:48: PM admin »  
: [1]  
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Javascripting  |  : Page Forwarding « previous next »
:  


Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!
Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.