ubernoob
08-01-2002, 03:49 PM
Alright, I could use alittle help on this one if anyone knows how to do it. What I want to do is get a popup window to reshape itself to fit accordly to different browsers screen area size.
What I am using the code for is an online auction site, where I have a small picture in my auctions and when the picture is clicked it opens up a larger version of the picture in a window, and has a close this window link in the popup for easily closing it.
The only problem I'm having is when I test it on different screen area sizes it's not showing the whole popup. Like for instance on a 600-800 it won't show the close the window link. Or the window will be to large to even see the whole picture. I tried putting in a scrolling bar but that didn't work either.
The script I used in the heading is this:
<SCRIPT language="JavaScript">
<!--
function Popup()
{
var popupURL ="EDITED";
var popup = window.open(popupURL,"Popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=50 0');
if( navigator.appName.substring(0,8) == "Netscape" )
{
popup.location = popupURL;
}
}
// -->
</SCRIPT>
I pulled that script off a tutorial site, as I wasn't to knowledgeable of javascript when I first started this project.
I use this script as the link where my picture is on the auction:
<A HREF="javascript:Popup()" ><img src="EDITED" height=100 width=100></A>
I pulled that off the same tutorial site. I messed around with the width and height attributes for awile but I don't know if those are whats affecting the way it's viewed. I edited out the the picture and url I used, but if it's needed I'll put them back in.
I want to thank anyone ahead of time for any responses to my question. I really appreciate you taking the time to try and help me out.
What I am using the code for is an online auction site, where I have a small picture in my auctions and when the picture is clicked it opens up a larger version of the picture in a window, and has a close this window link in the popup for easily closing it.
The only problem I'm having is when I test it on different screen area sizes it's not showing the whole popup. Like for instance on a 600-800 it won't show the close the window link. Or the window will be to large to even see the whole picture. I tried putting in a scrolling bar but that didn't work either.
The script I used in the heading is this:
<SCRIPT language="JavaScript">
<!--
function Popup()
{
var popupURL ="EDITED";
var popup = window.open(popupURL,"Popup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=500,height=50 0');
if( navigator.appName.substring(0,8) == "Netscape" )
{
popup.location = popupURL;
}
}
// -->
</SCRIPT>
I pulled that script off a tutorial site, as I wasn't to knowledgeable of javascript when I first started this project.
I use this script as the link where my picture is on the auction:
<A HREF="javascript:Popup()" ><img src="EDITED" height=100 width=100></A>
I pulled that off the same tutorial site. I messed around with the width and height attributes for awile but I don't know if those are whats affecting the way it's viewed. I edited out the the picture and url I used, but if it's needed I'll put them back in.
I want to thank anyone ahead of time for any responses to my question. I really appreciate you taking the time to try and help me out.