HighDots Forums  

Re: popup error (javascript)

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: popup error (javascript) in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lasse Reichstein Nielsen
 
Posts: n/a

Default Re: popup error (javascript) - 09-13-2003 , 06:50 AM






"Ben Wan" <bwan0425 (AT) rogers (DOT) com> writes:

Quote:
style language='javascript'
<style type="text/javascript">

The type attribute is required in HTML 4.

Quote:
!--
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.

Quote:
var loadedPic = picName;
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="javaScriptopup('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.'


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.