• Popups, Frames and Arrggh!

    Author
    Topic
    #353532

    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

    Viewing 4 reply threads
    Author
    Replies
    • #517516

      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;

      • #517525

        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

        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.

        • #517576

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

          Thanks for your help.

          Ade

    • #517558

      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.

    • #517567

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

      Much appreciated.

      Ade

    • #517628

      Ok this is in two parts

      MY main page looks like this:

      Mike and Kate’s Site

      On B page, I have this line:

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

    • #517629

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

      Dale Ernhardt Sr.

      This is not an Ad.


      Click here for the whole story.

    Viewing 4 reply threads
    Reply To: Popups, Frames and Arrggh!

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: