A directory of browser-based WYSIWYG editors


Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Add-Ons: Re: [webguy101au] Asp image manager: Edit Log

New User

Jan 17, 2005, 3:05 AM

Views: 19802
Re: [webguy101au] Asp image manager

I am also getting an error from insert-picture.js on line 69. I have tried debugging it and from what I can tell the "img" object is null the first time that you select an image and insert it into the htmlarea.

The error happens on the f_alt switch shown below. This is from the previous post with the zip file containing the complete image upload plugin.

 switch (field) {  
case "f_alt" : img.alt = value;break;
case "f_border" : img.border = parseInt(value || "0"); break;
case "f_align" : img.align = value; break;
case "f_vert" : img.vspace = parseInt(value || "0"); break;
case "f_horiz" : img.hspace = parseInt(value || "0"); break;
case "f_width" : img.width = parseInt(value || "0"); break;
case "f_height" : img.height = parseInt(value || "0"); break;

Does anyone know how to prevent this error in IE6?

update: I was able to fix this error by wrapping if (img) {....} around the block of code above. This doesn't seem to have caused any problems with the functionality so I guess that should be all that's needed. although I have a feeling that this code gets triggered when it shouldn't be so there might be a better solution elsewhere in the code.

(This post was edited by yeadongroup on Jan 17, 2005, 3:55 AM)

Edit Log:
Post edited by yeadongroup (New User) on Jan 17, 2005, 3:55 AM

Search for (options)