Hi
I’m writing a CMS and I need some help coming up with some JavaScript Code which will allow a user to click on an image shown on the page and this action will cause the following HTML snippet to be written into a textarea field named “content”:
<img src=“strImagePath” />
Where strImagePath is the src attribute of the image which was clicked.
The snippet should be inserted after any text already present in the textarea field.
The images are displayed in a <div> tag which can be shown or hidden the using the following HTML:
<div id="imagebrowser">
<img src="images/image1.jpg" name="image1" />
<img src="images/image2.jpg" name="image2" />
<img src="images/image3.jpg" name="image3" />
</div>
Can anyone point me in the right direction?