-
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
-
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
-
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
-
< !-- 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="javascript:popUp_('photo3.html')" target="_top"<>IMG height=135
src="images/helis.jpe" width=135 border=0<>/A></P<
-
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
-
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.]
-
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
-
Thanks again Jen ill check this out, regards Dave.