Popup Windows
- Started
- Last post
- 3 Responses
- Jamie
Does anyone know how to get a popup window to resize depending on the size of image inside?
- kutsie0
it seems like you could use PHP (or soemthing else, I only know PHP) and when the person clicks an image it calls a function to get the images width and height, then calls the pop-up window function and passes the h + w variables to it.
- fugged0
function resizeWin(w,h){
w2 = w+0;
h2 = h+0;
if (parseInt(navigator.appVersion)>... {
if (navigator.appName=="Netscape") {
top.outerWidth=w2;
top.outerHeight=h2;
}
else top.resizeTo(w2,h2);
}if (parseInt(navigator.appVersion) >= 4) window.moveTo((screen.width/2...
}In your IMG tag in HTML define an onLoad event as:
onLoad="resizeWin(this.width,thi...
- fugged0
ehm you can remove the w2= w+0;
and just use the argument w that's passed to the function. I had it in there to add padding...