|
Home > Archive > IIS ASP > May 2004 > Form Element Won't POST
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Form Element Won't POST
|
|
|
| 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.
| |
| Vidar Petursson 2004-05-30, 11:54 am |
| 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...rence_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
==============================
"MDW" <anonymous@discussions.microsoft.com> wrote in message
news:EA4DA52D-8D82-4C28-A1F6-1D4E4D4CEE98@microsoft.com...
> 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.
>
>
|
|
|
|
|