i wrote a simple script to be imported by any of my pages that need to pop up a window to a set size. I pass the url of the image or page that I need to load, as well as the width(x) and height(y).
here’s whats in my imported javascript.js file :
function picWindow(url,x,y) {
win = window.open(url,’pwindow’,”toolbar=no,location=no,resizable=no,menubar=no,scrollbars=no,width=x,height=y”);
win.focus()
}
here’s how I import it into the html file im calling it from:
<SCRIPT language=”javascript” src=”../../javascript.js”>
</SCRIPT>
and here’s how I call it from the link that that html page:
<a href=”javascript:picWindow(‘city.jpg’,300,300)”><img src=”thumbs/city_thumb.jpg” alt=”Futuristic City”></img></a>
It pops up a new window, with the correct url, but no matter that width and height I pass it, I always get the same, too big, size.
What am I doing wrong?