Welcome to TalkGraphics.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Hi Guys im having a few probs activating some popup windows from a frame set in IE5, it all seems to work fine on the actual page when not veiwed as part of the frame set, allso works fine in Nav 4.75 it must be something really simple that im over looking any ideas anyone, i have included the Javascriptin the head of the frameset but with no joy, regards Dave
    IP

  2. #2
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Hi Guys im having a few probs activating some popup windows from a frame set in IE5, it all seems to work fine on the actual page when not veiwed as part of the frame set, allso works fine in Nav 4.75 it must be something really simple that im over looking any ideas anyone, i have included the Javascriptin the head of the frameset but with no joy, regards Dave
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Austria
    Posts
    1,081

    Default

    evsy,

    there should be no difference in opening a popup from inside a frameset.
    Or are you trying to open it from the framepage (the page with the frame definition itself) ?? It's better to do this from one of the actual content-pages inside.

    Anyway, the key is the name of the window. If the name of the popup-window is the same as one of your frame names, it will use the frame instead of opening a new window.
    So give the popup a fancy name, that is unique and you should be fine.

    If now, please post the link or the code here ..

    Wolfgang
    IP

  4. #4
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    < !-- Begin
    function popUp(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men ubar=0,resizable=0,width=500,height=555,left = 0,top = 0');");
    }
    //-->
    </script>
    The above code is in the head of one of the content pages that ultimately gets loaded into the mainframe of the frame set, it works great when not part of the frame set but when this page is loaded into the frameset it just displays a new browser window at full sise saying it cant find the page.
    The popup is accessed with the code below its a link from a smaller image, the popups work fine when veiwed in netscape so it cant be far wrong, regards and TIA Dave.



    >A HREF="javascriptopUp_('photo3.html')" target="_top"<>IMG height=135
    src="images/helis.jpe" width=135 border=0<>/A></P<
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Austria
    Posts
    1,081

    Default

    evsy,

    you had a couple of errors in your script.
    First there are the brackets ( < and > ) that point to the wrong direction most of the time. But then this might be just a typo if you did not copy/paste the script.

    Then there was a missing semicolon after the funtion call.

    The real error though was the "target=_top" in the link. Without these it works flawlessly.

    See it in action here. You can grab the working code directly from the pages.

    Tested in Netscape 4.x and IE 5.5.
    Yell, if not working

    Wolfgang
    IP

  6. #6
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Thanks Wolfgang, i did finally figure it out >< was just my foolish way of displaying the code and not the image in the post above my appologies, any ideas for adding a on blur close window script thanks again for your help, Dave.

    [This message was edited by evsy on August 04, 2001 at 23:22.]
    IP

  7. #7
    Join Date
    Aug 2000
    Location
    NS Canada
    Posts
    212

    Default

    Hi ...

    I like to use onUnload, instead of onBlur, to close popups. This prevents inadvertantly closing one down that someone has just pushed to the background for the time being.

    Add this to the bottom of your pop up function :

    function closePopP(){

    if (navigator.appName != "Microsoft Internet Explorer"

    || parseInt(navigator.appVersion) >=4)

    if(popP != null) if(!popP.closed) popP.close()

    }

    Then add this to your body tag :

    onUnload="closePopP()"

    My pop up code (from http://www.crays.com/jsc/) is a bit different than your's, so your mileage may vary; it also has a nice little detect for already opened windows.

    Good luck.

    cfn ... Jen
    Jen Worden
    Web Developer
    www.meadoworks.com
    cfn ... Jen

    Jen Worden
    Web Developer
    www.meadoworks.com
    IP

  8. #8
    Join Date
    Aug 2000
    Location
    wakefield,nelson,new zealand.
    Posts
    57

    Default

    Thanks again Jen ill check this out, regards Dave.
    IP

 

 

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
  •