By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,714 Members | 1,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,714 IT Pros & Developers. It's quick & easy.

Form submit: select not submitted

P: n/a
Hi all!

This is more of an HTML question:

I have a form with many textfields on it, which I also check via JS.
When submitting the form, the textfields are all submitted, however the
selects aren't.

I looked at the HTML code and to me it seems fine. The selects all look
like this:

<select id="State061809" name="State061809" title="Edit&nbsp;state">
<option>A</option>
<option selected>B</option>
<option>C</option>
<option>S</option>
<option>U</option>
<option>P</option>
<option>E</option>
<option>R</option>
<option>null</option>
</select>

The selected state is set on all selects. I don't see the problem.

Does anyone know how to make the selects submittable?

Karsten

Dec 5 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Karsten Wutzke wrote:
Hi all!

This is more of an HTML question:

I have a form with many textfields on it, which I also check via JS.
When submitting the form, the textfields are all submitted, however the
selects aren't.

I looked at the HTML code and to me it seems fine. The selects all look
like this:

<select id="State061809" name="State061809" title="Edit&nbsp;state">
<option>A</option>
<option selected>B</option>
<option>C</option>
<option>S</option>
<option>U</option>
<option>P</option>
<option>E</option>
<option>R</option>
<option>null</option>
</select>

The selected state is set on all selects. I don't see the problem.

Does anyone know how to make the selects submittable?

Karsten

It's tough to say since the entire HTML isn't visible but if I had to
hazard a guess I'd say your <selecttags are outside of the <form>
enclosures. That would be the first thing I'd check.

---------------------------------------------------------------------------
http://www.hunlock.com
$FA
Dec 5 '06 #2

P: n/a
"Karsten Wutzke" <kw*****@web.dewrote:
>Hi all!

This is more of an HTML question:

I have a form with many textfields on it, which I also check via JS.
When submitting the form, the textfields are all submitted, however the
selects aren't.

I looked at the HTML code and to me it seems fine. The selects all look
like this:

<select id="State061809" name="State061809" title="Edit&nbsp;state">
<option>A</option>
<option selected>B</option>
<option>C</option>
<option>S</option>
<option>U</option>
<option>P</option>
<option>E</option>
<option>R</option>
<option>null</option>
</select>
I see that you don't have "value" attributes for any of your <option>
tags. So what is supposed to be submitted?

<option value="B" selected>B</option>
<option value="C" >C</option>
<option value="S" >S</option>
<option value="U" >U</option>
<option value="P" >P</option>
<option value="E" >E</option>
<option value="R" >R</option>
<option value="" >null</option>

--
Tim Slattery
Sl********@bls.gov
Dec 5 '06 #3

P: n/a
Tim Slattery wrote:
I see that you don't have "value" attributes for any of your <option>
tags. So what is supposed to be submitted?

The default is that the value of the select field is the either the
value of the currently selected "option" or if no value is specified the
text between the <optiontags. So if you have C showing in the select
box, every browser I'm aware of will return C even if no actual value is
specified. In this way it works as a loose text-box.

---------------------------------------------------------------------------
http://www.hunlock.com
$FA
Dec 5 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.