Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parameters transfer problem

Status
Not open for further replies.

adrianconst

Programmer
Oct 2, 2001
1
0
0
RO
I have a HTML page with a form in it


<form name=&quot;form3&quot; action = &quot;ATest.asp&quot; method=&quot;POST&quot;>
<table align = center>
<tr>
<td align=center><b>Code</b></td>
</tr>
<tr>
<td align=center><select name=&quot;Code&quot; id=&quot;Code&quot; onchange=&quot;f1(this.form)&quot;>
<option>Choose one of the following
<option selected=TRUE>105
<option>106
</select></td>
</tr>
<tr></tr>
<tr><td align=center><b>Description<b></td>
</tr>
<tr>
<td align=center><input name=&quot;Descr&quot; id=&quot;Descr&quot; size=60></td>
</tr>
</table>
<br>
<input type=&quot;submit&quot; value=&quot;Send&quot; id=submit1 name=submit1>
</form>

and a implementation in JavaScript for the f1 function as below:

<script language=javascript>
function f1()
{
if (document.form3.Code.selectedIndex != 0) {
nr = document.form3.Code.selectedIndex;
val1 = String(document.form3.Code.value);
window.location.href='AUpdateTPersonal.asp?nr='+nr+'&val='+val1;
}}
</script>

The effect of change button is that the nr parameter is transmited correctly but the val parameter will be empty.
Can anyone know what is wrong here?
 
I never went through the whole thing ,
But I think you have to say ...

<option value='106'>106</option>

???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top