function showPict(img,x,y) {
var text='<html><body onblur="this.close()" ';
text += 'onclick="this.close()" background="'; // onclick is not working in
IE
The "this" keyword may not be pointing to the object you assume it is. In
fact, I bet it refers to the document object in MSIE (and to window in FF).
Which won't close the window in IE.
Try self.close().
text += param;
text += '" onload="this.resizeTo('+ x + ',' + y + ')">test</body></html>'
Again, for cross-browser scripting, best to specifically call window.resizeTo
(or self.resizeTo). Don't use "this". It refers to document in some browsers
and window in others.
var ipp =
window.open("","MadoPop","width=100,height=100,dependent=yes,resizable=no,ho
tkeys=no",true);
You need to set status=no for some browsers. Try that. I always specifically
set them to no when I want to make sure they aren't there.
ipp.document.write(text);
I believe you have to open it first. If you don't have to, it's still better
form.
ipp.document.open();
ipp.document.write(text);
ipp.document.close();
And in the body of the page, I have:
<a href="javascript:void()"
Ooh, icky. Old skool. In a bad way.
<a href="someNonJsWarningPage.html"
onClick="showPict('image.jpg',680,540);return false;">
The popup is resizable and has a status bar in FF (why ?),
Keep in mind that FF allows me to tell my browser to not allow scripts to
disable those things. Check your FF preferences before you think your script
is actually broken. In MY FF, you can't open a new window at all.

It will open in a new tab no matter what your script says. I set it up that
way because I hate when people spawn popups. That means when you resize, it
resizes EVERYTHING, so I have that turned off, too.
FF is all about customization.
I don't remember what the defaults are, so check what your scripts are set to
be allowed to do. Tools->options->web features
Click Advanced button. Make sure "move or resize windows" is checked and
"hide the status bar" is checked. Mine are both unchecked.
And what's with the extra "true" param? The method window.open() only takes
3. Not 4.
from this site :
http://javascriptkit.com/jsref/window.shtml
"open(URL, [name], [features], [replace])"
That is not official documentation.
This is. Well, for Gecko anyway.
http://www.mozilla.org/docs/dom/domref/dom_window_ref76.html
The 4 args is, apparently, MSIE specific, since MSIE docs have it and Gecko
does not. This is not unusual. Different browsers support different things.
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp
Be careful what references you read and always check the browser
documentation to see what is supported.
This argument is not the reason of my errors.
Probably not (probably ignores that 4th one), but it might really fudge up
Safari, for all I know.
--
--
~kaeli~
Contrary to popular opinion, the plural of 'anecdote' is
not 'fact'.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace