Quisiera consultarles si conocen algún script que me permita arrastrar información de un texto hacia una caja de texto (ver figura)

de tal forma que pudiera escoger una de las opciones y arrastrarla al TEXTBOX
Gracias !
| ||||
Re: Donde consigo un script con el que pueda arrastrar texto hacia un textbox ? Hola cookie! ¿Sí o sí tiene que ser "arrastrando" el texto hasta el campo? Por si te sirve de algo, solamente se me ocurrió como hacerlo clickeando en la opción (es decir, haces click sobre la opción y se copia en el campo de texto). Te dejo el código:
Código:
<script language="javascript" type="text/javascript"> function PasarTxt(ID_Text, ID_campo) { document.getElementById(ID_campo).value = document.getElementById(ID_Text).text; } </script> <form name="formulario"> <table> <tr> <td width=50%><a href="#" id=Opcion1 onClick="PasarTxt(this.id, 'Campo1'); return false;">Opción 1</a></td> <td width=50%><input type=text name=campoTxt id=Campo1></td></tr> <tr> <td width=50%><a href="#" id=Opcion2 onClick="PasarTxt(this.id, 'Campo1'); return false;">Opción 2</a></td> <td width=50%> </td></tr> <tr> <td width=50%><a href="#" id=Opcion3 onClick="PasarTxt(this.id, 'Campo1'); return false;">Opción 3</a></td> <td width=50%> </td></tr> <tr> <td width=50%><a href="#" id=Opcion4 onClick="PasarTxt(this.id, 'Campo1'); return false;">Opción 4</a></td> <td width=50%> </td></tr> <tr> <td width=50%><a href="#" id=Opcion5 onClick="PasarTxt(this.id, 'Campo1'); return false;">Opción 5</a></td> <td width=50%> </td></tr> </table> </form> |