Posting 3 values from a form

liunx

Guest
How can you post multiple values (as in 3 values) from a FORM. I can send one using a dropdowm with select/option etc but i want to send more than one value. Anyone GOT ANY IDEAS?? it there a javascript solution to my problem?:confused:<!--content-->Can you explain a bit further?<br />
<br />
When a form is submitted, any data from the form should be sent wherever you have the ACTION value set at.<br />
<br />
Perhaps you are inquiring about different form objects such as textareas, listboxes, checkboxes, and so on?<!--content-->hmmnn.... yes tallPaul, I don't know what your referring to either. <br />
<br />
Take this form for example:<br />
<br />
<html><br />
<head><title></title></head><br />
<body><br />
<form name=f1 action="http://www.yahoo.com" method=get><br />
<input type=text name=t1 value="text value 1"><br />
<input type=text name=t2 value="text value 2"><br />
<input type=radio name=r1 value="radio value 1"><br />
<input type=radio name=r1 value="radio value 2" checked><br />
<input type=submit><input type=reset><br />
</form><br />
</body><br />
</html><br />
<br />
press the submit button and you'll see multiple value appear in the URL string. You should see t1=value&t2=value&r1=value<br />
<br />
this is because I chose the method=get. You should be able to pass about 4k worth of data in the url string. Using post allows you to pass more than 4k of data, but it passes it in the document body... not in the url. <br />
<br />
You would need to use server side coding to get posted data, but client side javascript can capture the url string data just fine.<!--content-->Ok, your question is not quite clear to me either, but I will also give it a shot:<br />
<br />
are you looking for the user being able to select more than one option ? If so, simply add MULTIPLE to your select tag. also set the size of the select tag to more than one.<br />
<br />
<form name=f1 action="http://www.yahoo.com" method=get><br />
<select MULTIPLE size=5><br />
<option value="1" SELECTED>one</option><br />
<option value="2">two</option><br />
<option value="3">three</option><br />
<option value="4">four</option><br />
</select><br />
<br />
</form><!--content-->
 
Back
Top