J
Junoon
hi all,
I am trying to get the values of the item selected in a select list box
into a textarea, but the code is not working....Where am i going
wrong????
whenever i click on any item in the list, the corresponding value for
it will get displayed in the text area.....
Also, is there a way to get data from a text file into the textarea,
when i select an item in the list.
*****************************************
<html>
<head>
<script language="javascript">
function getit(){
var data='...\n';
if(data.value){
data=document.form1.sel1.options[document.form1.sel1.SelectedIndex].value+"....\n";
document.form1.tex1.value=data;
}
}
</script>
</head>
<body>
<form name="form1" onsubmit="getit(); return false">
<table>
<tr><td>Issue: </td>
<td><select name="sel1" size= "3">
<option value="pc problem">error 0680
<option value="modem problem">error 0633
<option value="network problem">error 0721
</select>
</td>
<td>Resolution: </td>
<td><textarea name="tex1" rows=7 cols=30 wrap=virtual></textarea>
</td>
</tr>
<TR>
<TD COLSPAN=2 ALIGN=center>
<INPUT TYPE=submit VALUE="Submit form"><BR>
<INPUT TYPE=reset>
</TD>
</TR>
</table>
</form>
</body>
</html>
Rgds,
I am trying to get the values of the item selected in a select list box
into a textarea, but the code is not working....Where am i going
wrong????
whenever i click on any item in the list, the corresponding value for
it will get displayed in the text area.....
Also, is there a way to get data from a text file into the textarea,
when i select an item in the list.
*****************************************
<html>
<head>
<script language="javascript">
function getit(){
var data='...\n';
if(data.value){
data=document.form1.sel1.options[document.form1.sel1.SelectedIndex].value+"....\n";
document.form1.tex1.value=data;
}
}
</script>
</head>
<body>
<form name="form1" onsubmit="getit(); return false">
<table>
<tr><td>Issue: </td>
<td><select name="sel1" size= "3">
<option value="pc problem">error 0680
<option value="modem problem">error 0633
<option value="network problem">error 0721
</select>
</td>
<td>Resolution: </td>
<td><textarea name="tex1" rows=7 cols=30 wrap=virtual></textarea>
</td>
</tr>
<TR>
<TD COLSPAN=2 ALIGN=center>
<INPUT TYPE=submit VALUE="Submit form"><BR>
<INPUT TYPE=reset>
</TD>
</TR>
</table>
</form>
</body>
</html>
Rgds,