Click to See Complete Forum and Search --> : Create link text by pressing a button


lcscne
12-12-2003, 07:33 AM
I have an html form with:

<input type='text' name='linktext' />
<input type='text' name='url' />
<input type='button' name='pastelink' value='Paste Link' onclick='ineedhelp()' />
<textarea name='myinfo' cols='30' rows='7'></textarea>

and I want the user to be able to key in a link name as well as paste a url into the url feild. Then I want the user to be able to place the insertion point at any particular spot in the textarea and have the onclick of the button build an <a> tag string and paste that string into the textarea at the insertion point. Would anyone be so kind as to tackle this for me?

If I could have the completed <a> tag string inserted into a third field that the user could manualy copy and paste to the textarea that would be acceptable too.

Much appreciated.