Results 1 to 3 of 3

Thread: redirecting a page

  1. #1
    Join Date
    Aug 2006
    Posts
    65
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default redirecting a page

    I am trying to redirect a page after about 30 seconds but it hit the page and only stays for 1 sec... what am I doing wrong?

    here is the code
    Code:
                  <script type="text/javascript">
    			window.onload=WindowLoad;
    			function WindowLoad(event)
    			{
    			   setTimeout("location = 'EquipReport.php';", 30);
    			}
    			</script>
    how can I change it?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
                  <script type="text/javascript">
    			window.onload=WindowLoad;
    			function WindowLoad(event)
    			{
    			   setTimeout("location = 'EquipReport.php';", 30000);
    			}
    			</script>
    setTimeout uses milliseconds, not seconds.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2006
    Posts
    65
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    ahh.. lol.. no wonder ...... Thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •