Results 1 to 11 of 11
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Popups, Frames and Arrggh!

    Can somebody guide me through popup windows and how a hyperlink in a popup window can alter the frame displayed in my main web page in the background please?

    Specifically, I have a frames page that opens and an OnLoad event (from the main page in that frame) that triggers a popup window to inform visitors that a new message has been posted to the noticeboard area of the site. How do I create a hyperlink, in the popup window, that loads the noticeboard page in the frames page that the popup window was called from? Phew!

    Any help always greatly appreciated.

    Cheers,

    Ade

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Popups, Frames and Arrggh!

    If JavaScript code in Window1 pops open Window2, code in Window2 has (at least) two options for referring back to Window1.

    (1) In Window2, the opener property points back to Window1 (version 3 browsers and higher):

    self.opener.document.etc.;

    (2) You can pass a reference to Window1 as your own property:

    Window2 = window.open(etc.);
    Window2.creator = self;

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    or . . .
    if window1 consits of frame1 and frame2,
    and the pop up (window2) is loaded by window1's frame1,
    but you want to load something into frame2,
    you can reference frame2 in the target parameter of your link.

    the popup would contain a link like
    <pre><a href="noticeboard.html" target="frame2"></pre>

    I'm not sure how to phrase this, but the target parameter is obeyed whether it is a window, a frame within a window, or a frame within another window. Does that make sense?

    This is a lot simpler than it sounds.

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    Heya Ade, I have exactly what you want but unfortunetly my DSL is down. Gimme a day and I'll email you the code.
    I have a page, two frames. A & B When you select something in A it opens in B. I also have a small pop up window. When you click in there, it opens something in B. Send me a priuvate with your email addy and i'll send you the code. I'm at work and I don't have it here.
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

  5. #5
    KTYorke
    Guest

    Re: Popups, Frames and Arrggh!

    Mike,
    When you get the code post it here for anyone else looking for the same thing to see...
    [img]/w3timages/icons/wink.gif[/img]
    have fun

  6. #6
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    Thanks to you all - I have lots of options to try now.

    Much appreciated.

    Ade

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    Superb! What a simple solution! Works perfectly thanks. Interested to see what the JavaScript solutions being offered will do?

    Thanks for your help.

    Ade

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    PA
    Posts
    246
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    <pre> """
    <(

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    Ok this is in two parts

    MY main page looks like this:

    <HTML>
    <TITLE>Mike and Kate's Site</TITLE>

    <FRAMESET cols="22%,78%">
    <FRAME NAME="A" NORESIZE="YES" SRC="mainlinks.html">
    <FRAME NAME="B" NORESIZE="YES" SRC="main.html">
    </FRAMESET>
    </HTML>

    On B page, I have this line:

    <SCRIPT LANGUAGE="javascript">

    window.open ('dale.html', 'newwindow', config='height=190,width=228, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, directories=no, status=no')

    </SCRIPT>
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    oh wait one more, my pop-up page looks like this:


    <html>

    <head>
    <title>Dale Ernhardt Sr.</title>
    </head>

    <body bgcolor="#000000" text="#FF0000">
    <CENTER><H4>This is not an Ad.
    <A HREF="http://www.nascar.com/2001/NEWS/02/18/earnhardt_stewart/index.html" Target="B">
    [img]images/earnhardt.jpg[/img]</A>
    Click here for the whole story.

    </body>

    </html>
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

  11. #11
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Edinburgh, Midlothian, Scotland
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Popups, Frames and Arrggh!

    Got it thanks - works too!

    Ade

Posting Permissions

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