html form help!!

liunx

Guest
Hi<br />
<br />
I have an html form that gets info from a text box and a dropdown. As Below<br />
<br />
<br />
<input type="text" name="name"><br />
<br />
<select size="1" name="number"><br />
<option selected>1</option><br />
<option>2</option><br />
<option>3</option><br />
<option>4</option><br />
</select><br />
<br />
<br />
I need to know how access the values in the text box and the dropdown. do i need to use VBscript??<!--content-->I don't see any form tag in your code !<br />
and about the VB script it depeneds what do you want to do. <br />
Please explain !<!--content-->there is a form tag, i just didnt put it on there. All i want to do is put the value from the text box together with the value from the dropdown, in a string or something. so i can use it as a single value on its own.<!--content-->HTML is static and to do any kind of manipulations you need to take the help of scripts.<br />
<br />
You can give id's to the text and select and select their values in the script <br />
<br />
eg<br />
<br />
<script><br />
textvalue = getElementById('1').value <br />
// you have got the value of the text <br />
</script><br />
<html><br />
<body><br />
<input type= text id="1"><br />
</body><br />
</html><br />
<br />
hope this helps<!--content-->There are a number of languages you can use: Perl, PHP, ASP.NET, VB.NET, Javascript... choose your poison. :D<!--content-->thanks guys!<!--content-->Ah, 1 more question. I have got that part working, now i need to use that string back in HTML, in the value of a hidden input:<br />
<br />
<input type="hidden" value=????><br />
<br />
what would i put after value=<!--content-->hey HTML is STATIC <br />
again for setting the value you need to take help of script<br />
<br />
in the script you can write id.value = string<br />
<br />
post the code if you don't get it<!--content-->This doesnt seem to work<br />
<br />
<br />
<input type="text" size="42" id="val1"><br />
<input type="text" size="42" id="val2"><br />
<input type="hidden" id="val3"><br />
<script><br />
val3.value=getElementById('val1').value & getElementById('val2').value <br />
</script><br />
<br />
do you know why?<!--content-->try this out <br />
getElementById('val3').value=getElementById('val1').value & getElementById<!--content-->
 
Back
Top