Form Element Won't POST

M

MDW

Hey all

I'm kind of in a bind here.

I've got a select box on a page that starts out like this
<select size=10 multiple name="AllAccts"></select

No options.

I use Javascript and an input box to allow the user to populate this with options. This works, and JavaScript can even read the length of that box (and prevent form submission of the length is 0)

However, when I post this page, that form element doesn't come through. Every other element does. Here's what I've found so far

If I change the initial page to this:
<select size=10 multiple name="AllAccts"><option value=""></option></select

then the element does post. However, it posts an empty string, no matter how many other options I add after that.

I'm not sure if this is a JavaScript problem or an ASP problem, or what, but it's really frustrating. I hope someone can help.
 
V

Vidar Petursson

Hi

Ok.. are you setting the value of the option, only the
value gets posted

var o = document.createElement("OPTION");
o.value = "blah";
o.text = "blah";

More info
http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

--
Best Regards
Vidar Petursson
==============================
Microsoft Visual: Scripting MVP 2000-2004
http://www.icysoft.com/
http://www.deus-x.com/ Instant e-commerce
http://www.microsoft.com/technet/scriptcenter/
Playground: http://213.190.104.211/ ( IE 5.5+ only )

No matter where you go there you are
==============================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,150
Messages
2,570,853
Members
47,394
Latest member
Olekdev

Latest Threads

Top