Reputation: 159
I am trying to insert text in to an input field using this code.
This is the code I am using:
<input class="cid" type="text" name="c1" />
<input class="cid" type="text" name="c2" />
<input type="button" value="Insert Text" onclick="insertAtCaret('c1','TEXTTOINSERT1');insertAtCaret('c2','TEXTTOINSERT2');" />
But nothing is happening. I don't know JS so I'm not sure if the JS code I referenced before is only for textareas which did work when I tested.
Thanks!
Upvotes: 0
Views: 187