SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help redirecting pages

    Hello,

    I'm using the following command to redirect to another page inside the head tags:

    <meta Http-Equiv="Refresh" content="0;url=http://www.mydomain.com">

    I have a page with two frames and on one frame a page where i use this command. It has a form for users to fill, after they fill the form i want the page to be redirected to another page but breaking out of the two frames.

    Any help would be appreciated.


    Toly

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i just posted this about half hour ago try that.


    or

    top.window.location="http://www.sitepointforums.com/newreply.php?s=&action=newreply&threadid=55559";

  3. #3
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that script but it didn't work... it produces an error and besides i need the script to redirect to another page but breaking out of frames. With this script the page that will appear after the redirection will still be on one frame.


    Toly
    Community Guidelines | Community FAQ

    "He that is kind is free, though he is a slave;
    he that is evil is a slave, though he be a king." - St. Augustine

  4. #4
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm which did? it works for me i just checked it?

    what code you using?

  5. #5
    Free your mind Toly's Avatar
    Join Date
    Sep 2001
    Location
    Panama
    Posts
    2,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried the one below:

    <html>
    <head>
    <script language="JavaScript">

    function redirect(url)

    document.location = url;

    </script>
    </head>
    <body onload="redirect('http://www.sitepointforums.com')">
    </body>
    </html>

  6. #6
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    <html
    <
    head
    <
    script language="JavaScript"

    function 
    redirect(url

    top.window.location url

    </script> 
    </head> 
    <body onload="redirect'http://www.sitepointforums.com')"> 
    </body> 
    </html>

    i did give u this before u must of skipped it;) 

  7. #7
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    or try this

    PHP Code:

    <script language=JavaScript>
    if(
    top!=self){top.location.href=self.location.href;} 
    </script> 


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
  •