Results 1 to 5 of 5

Thread: redirect page

  1. #1
    Join Date
    Sep 2008
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Red face redirect page

    is there any script when page refresh its redirect to an other page?

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    How does your page gets refreshed? via meta tag or another JS function?

    Anyway, you can use:
    Code:
    location.href='http://www.google.com'
    Hope that helps.

    Get back if you're still stumped.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Sep 2008
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    when people click on refresh button or press f5 then it can be redirect?how can i?

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    When people press F5, you can redirect it to another page, but not when the refresh button is pressed:
    Code:
    <script type="text/javascript">
    window.onload=function()
    {
    document.onkeydown=function(event)
    	{
    	var keyCode=event.keyCode?event.keyCode:event.which?event.which:event.charCode;
    	if(keyCode==116) // If F5 is pressed
    		location.href='http://www.google.com'; // Redirects to another URI
    	}
    }
    </script>
    Hope that helps.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Sep 2008
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    if a have auto refresh page script then i can redirect?or can i disable refresh button?

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
  •