473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Form submit: select not submitted

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
3 3267
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jeff | last post by:
Hello, I have a form that submits it's values to a pop-up window. I've simplied the code: <form name="formname" action="action.php" target="windowName" method="post" onsubmit="window.open('',...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
5
by: cmc_dermo | last post by:
I have a form that has a select list. A user chooses a value and the page refreshes showing the selected value in the dropdown box. So I want to use Javascript to get the selected query from...
3
by: bdog4 | last post by:
I know this is beginner stuff but why is it that when I run this validation my form still gets submitted. Can someone explain what I'm doing wrong. I don't quite understand how the return...
4
by: sameergn | last post by:
Hi, I have an image in my HTML form which has onclick() handler. There is also a submit button and a text box. Whenever text box has focus and user presses enter, the onclick() event of...
13
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end...
4
by: Greg Scharlemann | last post by:
I'm trying to setup a dyamic dropdown list that displays a number of text fields based on the selected number in the dropdown. The problem I am running into is capturing the data already entered...
5
by: keeps21 | last post by:
A little problem I've run into is the following. I have a script that allows a user to edit a story. I have an HTML form for title and main_text which gets it's values by pulling the selected...
12
by: colt28 | last post by:
Ok so I found an ajax contact form script but i can't get the b****** to work. I made a bunch of alterations to it and it didn't work so i replaced everything with the original and it still didn't...
13
Frinavale
by: Frinavale | last post by:
I've been trying all morning to cancel a form submit to the server. I have a JavaScript Object that determines whether or not the page should be submitted to the server depending on whether the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.