"Ben Wan" <bwan0425 (AT) rogers (DOT) com> writes:
Quote:
style language='javascript' |
<style type="text/javascript">
The type attribute is required in HTML 4.
HTML comments are not needed in Javascript.
Quote:
function popup(picName, chatWidth, chatHeight) { |
Your global function is called "popup" ...
Quote:
popup = window.open('/popup.html','popup','left=50,top=50'); |
... and here you assign a window to the global variable "popup",
overwriting the function.
Why rename the variable? You can just use "picName".
Quote:
while(popup.document.readyState != "complete") {} |
Busy-waiting is a bad idea. It takes up ressources and binds the
browser until it finishes (if it does!).
If you insist on waiting until readyState goes "complete" (how many
browsers supports that? Mozilla and Netscape 4 doesn't.)
Quote:
popup.resizeTo(chatWidth,chatHeight);
popup.document.images.src=loadedPic; |
Which image? I think you mean
popup.document.images[0].src = picName;
Quote:
popup.focus();
};
//--
/style></head><body
A href="javaScript opup('largePic.jpg','750','392') "><IMG
src="smallPIc.jpg" align=center></A |
Don't use the javascript
: pseudo protocol.
<URL:http://jibbering.com/faq/#FAQ4_24>
/L
--
Lasse Reichstein Nielsen - lrn (AT) hotpop (DOT) com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'