Having got round all the problems of being able to upload and resize an image, I now want the HTML generated (typically something like <img border="2" align="left" style="padding: 5px; margin-right: 5px;" src="/UserFiles/smallerbss.jpg" alt="" />) to have a few methods included within it, for example onMouseOver="this.style.cursor='pointer'" onMouseOut="this.style.cursor='auto'" onClick="PicturePopUp(this)".
Is it simply a case of modifying the UpdateImage function to include statements such as
SetAttribute( e, 'onClick', "PicturePopUp(this)") ;
or do the settable attributes have to be defined somewhere first?
Is it simply a case of modifying the UpdateImage function to include statements such as
SetAttribute( e, 'onClick', "PicturePopUp(this)") ;
or do the settable attributes have to be defined somewhere first?
RE: Inserting an image with a link
The image dialog window already has a link tab that allows to select a link that will hold the image and this way you don't need all that javascript.
Besides using those onMouseOver and onMouseOut to change the cursor are very bad coding practice, the cursor only shows while you are over the image, so it is easier to put style="cursor:pointer" and it will work without problems. (of course if you put a link then you don't need to change the cursor, it will change automatically)