View Full Version : anyone can modify this script?

12-25-2004, 11:31 AM
anyone can modify the following script no to show in the text field but in a table

//get scripts from javascriptkit.com
<form name="combowithtext">
<select name="example" size="1" onChange="showtext()">
<option value="http://www.cnet.com">Cnet</option>
<option value="http://www.cnn.com">CNN</option>
<option value="http://www.geocities.com">Geocities</option>
<input type="button" value="Go!"
<textarea rows=5 cols=21 wrap="virtual" name="text"></textarea>
<script language="javascript">

var shortcut=document.combowithtext
var descriptions=new Array()

//extend this list if neccessary to accomodate more selections
descriptions[0]="Click here for Cnet, the primer technology site on the net!"
descriptions[1]="Click here for CNN, one of the best sources online to get your news."
descriptions[2]="Click here for Geocities, and receive 10 megs of free web space."

function gothere(){

function showtext(){


Willy Duitt
12-27-2004, 04:33 AM
Create your table and give an ID to the data cell you wish to enter the chosen text... and then change this line:


To point to the data cell using:

document.getElementById('ID_OF_DATA_CELL').innerHTML = descriptions[shortcut.....