Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2003
    Location
    Malaysia
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open a new page but keep the current page.

    Hi there, could you guys help me out?

    Ok, what I want is, how do i make a page which will open a new page but the current page will go back to the previous page?

    Like, ok, when i click on a link, it will go to another page which will open another window, and after that, the current page will go back to the previous page....

    and i know, we can make it once click on a link, it automatically open a new page, but i dont want that, i want go to another page and open a link and go back...

    I hope you could understand my question... Thanks alot...

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    pop up blockers would block it....
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    New Coder
    Join Date
    Jan 2003
    Location
    Malaysia
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hmm, well, can give me the codes ? or can i find from other website?

  • #4
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,495
    Thanks
    3
    Thanked 500 Times in 487 Posts
    very crude but

    b1.htm
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
    >

    <
    html>

    <
    head>
      <
    title></title>

    <
    script language="JavaScript" type="text/javascript">
    <!--
    // Script produced with PopUpGenerator
    // by Vic Phillips [url]http://www.vicsjavascripts.org.uk[/url]

    // Insert this script between the <header> tags

    var pugWindow1=null;

    function 
    pugNewWindow(pugname,puglink){
     
    pugCloseWin();

     if (
    pugname==pugWindow1){
      
    pugWindow1=window.open(puglink,'pugWindow1','width=300,height=300');
     }
    }

    function 
    pugCloseWin(){
    // Recommended - include onunload="pugCloseWin();" in the <body> tag.
     
    if (pugWindow1&&!pugWindow1.closed){ pugWindow1.close(); }
    }

    function 
    Back(){
     
    loc=self.location+'';
     
    window.top.location=loc.split('?')[1];
    }

    //-->
    </script>


    </head>

    <body onload="javascript:pugNewWindow(pugWindow1,'http://www.vicsjavascripts.org.uk');Back();">

    </body>

    </html> 
    b0.htm
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"
    >

    <
    html>

    <
    head>
      <
    title></title>
    </
    head>

    <
    body>

    </
    body>
    <
    a href="b1.htm?b0.htm">Link</a>
    </
    html

  • #5
    New Coder
    Join Date
    Mar 2005
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I'm thinking frames....

    I'm thinking frames would work the best. Sure, you end up writing a couple more pages than you'd like, but it avoids pop-up blockers, and it gives you the freedom to have as many windows as you'd like. Plus, in my opinion, I think it looks more professional, and you'll want that.


  •  

    Posting Permissions

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