Super Web Mart - Discount Coupons & Deals - Discount Promos, Coupon Codes, Discount deals and web site reviews
 

Author Topic: On pageload redirect by JavaScript  (Read 557 times)

0 Members and 1 Guest are viewing this topic.

Offline Solushunz

  • Full Member
  • ***
  • Posts: 130
    • View Profile
On pageload redirect by JavaScript
« on: August 08, 2011, 11:21:41 PM »
I use this code to redirect on page load, is there any problem because this is not

working properly

Code: [Select]
<script language="JavaScript">
var sTargetURL = "redirectiontarget.htm";
function doRedirect()
{
    setTimeout( "window.location.href =url, 2*1000 );
}
</script>
<script language="JavaScript1.1">
function doRedirect()
{
    window.location.replace( sTargetURL );
}
doRedirect();
</script>
<body onload="doRedirect()">
<p>Loading <a href="redirectiontarget.htm">redirection target</a></p>
<p>In approx. 2 seconds the redirection target page should load.<br>
If it doesn't please select the link above.</p>
« Last Edit: August 09, 2011, 02:35:10 AM by seochapter »

Webmaster Forum

On pageload redirect by JavaScript
« on: August 08, 2011, 11:21:41 PM »