Hello,
I need to clear the onmouseover and onmouseout attribute when editing the properties of an existing image.
I have modified the fck_image.js to replace these attributes after hitting the OK button of the Image properties dialog, but it duplicates the attributes, rather then overwriting them.
Here is my addition to the fck_image.js inserted at line 266
SetAttribute( e, "onmouseover" , "MM_swapImage('"+GetE('ImageID').value+"',' ','"+GetE('RolloverImagePath').value+"',1)" ) ;
SetAttribute( e, "onmouseout" , 'MM_swapImgRestore()' ) ;
The two fields ImageID, and RolloverImagePath have been added to the Image properties dialog, so I can point to a rollover image and specify the id.
Thanks
Any help is appreciated.
I need to clear the onmouseover and onmouseout attribute when editing the properties of an existing image.
I have modified the fck_image.js to replace these attributes after hitting the OK button of the Image properties dialog, but it duplicates the attributes, rather then overwriting them.
Here is my addition to the fck_image.js inserted at line 266
SetAttribute( e, "onmouseover" , "MM_swapImage('"+GetE('ImageID').value+"',' ','"+GetE('RolloverImagePath').value+"',1)" ) ;
SetAttribute( e, "onmouseout" , 'MM_swapImgRestore()' ) ;
The two fields ImageID, and RolloverImagePath have been added to the Image properties dialog, so I can point to a rollover image and specify the id.
Thanks
Any help is appreciated.
Re: Clear onmouseover and onmouseout when editing an image
You can use them to read the previous value, and update them to your new values, instead of directly assigning on* event handlers.