I want to draw a form where there will be some textarea, on the textarea there will be a little image [the image's size will be smaller than the size of the textarea], and clicking on the image will call a function fx()
Can anyone code this for me in JavaScript/jquery/CSS ?

In this image the GO is an image, clicking on it will call Fx()

i tried with it and failed (and dont know how to attach a function on the image)

Are the height and width of the textarea known?
–
Pekka 웃Apr 22 '11 at 8:00

2

Do you want someone to do the work for you, or do you want help solving a problem? I would appreciate if you gave it a try your self first, and then ask the question if you are stuck. This is not "RentACoder".
–
MartinApr 22 '11 at 8:00

There's an even simpler approach that doesn't need JavaScript at all, but uses display: inline-block which won't work properly in IE6/7 (although I guess it could be made work in IE7 by using a span instead of a div for wrapper).

@Madmartigan's solution is how I'd do it: set a padding on the wrapper div, remove the border from the textarea and add it to the wrapping div instead (to make it look like the textarea has a padding).
–
ZnarkusApr 22 '11 at 9:54

You cannot place an image tag inside a textarea unless it's a background image. To work around this Use a div with contentEditable attribute. This will act like a textarea and will allow you to insert an <img> tag inside. That's how WYSIWYG editors work. Then with simpe CSS you can position the image bottom right.