tags:

views:

21

answers:

1

Hi all,

I am not sure if Select Tag can work with Hidden Text Input like this:

<SELECT NAME="Testing">  
  <OPTION VALUE="1"> One </option> 
  <input type="hidden" value="hello" name="Testing">
  <OPTION VALUE="2"> Two </option>
  <input type="hidden" value="world" name="Testing">   
</SELECT>

Any ideas?

+2  A: 

That won't work, but this will:

<form>
<input type="hidden" value="hello" name="Testing">
<input type="hidden" value="world" name="Testing">   
<SELECT NAME="Testing">  
  <OPTION VALUE="1"> One </option> 
  <OPTION VALUE="2"> Two </option>
</SELECT>
</form>

Now judging from your code, it looks like you want Testing=hello if the first option is selected and Testing=world if the second option is selected. In that case, do it like this:

<SELECT NAME="Testing">  
  <OPTION VALUE="hello"> One </option> 
  <OPTION VALUE="world"> Two </option>
</SELECT>
bluesmoon
Thank you bluesmoon