Visual Basic .NET » Web Forms
Parsing Form Data -- Jim R --


Just fyi if you are using code from the Starter Kit:

Found a possible javascript bug in the Starter Kit in the function that parses form input in the Feedback example (file feedback.js line 39).

case "input":
switch(ele.type) {
case "text":
case "checkbox":
case "radio":
data
= ele.value;
break;
default:
break;
}

should be:

case "input":
switch(ele.type) {
case "text":
data
= ele.value;
break;
case "checkbox":
case "radio":
if (ele.checked) data
= ele.value;
break;
default:
break;
}

Before if a radio button wasn't check you would still get a value.

I'm not sure if this is the only way to get form data but it is working for me.

[Submit Comment]Home