MarioPro
12-30-2005, 09:37 PM
Is there a way to do the following in Javascript?
I have a list of words that I whish to convert into links to add to a textbox
$list="Blue; Clear Sky; Erode; Erosion; Pole; Sea; Shadow; Sky; Weather; Wood";
What I need is to get each one as a link
<a href="#" onClick="addToTextbox()">Blue</a>
<a href="#" onClick="addToTextbox()">Clear Sky</a>
<a href="#" onClick="addToTextbox()">Erode</a>
But everytime the user clicks a new word it will be added to the ones already in the textbox, with a " AND " prefix
Thnaks in advance for any help
I have a list of words that I whish to convert into links to add to a textbox
$list="Blue; Clear Sky; Erode; Erosion; Pole; Sea; Shadow; Sky; Weather; Wood";
What I need is to get each one as a link
<a href="#" onClick="addToTextbox()">Blue</a>
<a href="#" onClick="addToTextbox()">Clear Sky</a>
<a href="#" onClick="addToTextbox()">Erode</a>
But everytime the user clicks a new word it will be added to the ones already in the textbox, with a " AND " prefix
Thnaks in advance for any help