Alaska Software Inc. - GetVar returning wrong value for multiple chekboxes
Username: Password:
AuthorTopic: GetVar returning wrong value for multiple chekboxes
Thomas Braun
GetVar returning wrong value for multiple chekboxes
on Mon, 14 Jun 2010 17:01:23 +0200
Hi,

I'm currently challenged by a weird case...

Consider a form with a multiple choice mada from checkboxes with the same
name.

<input checked="checked" value="112" name="SUPP28">
<input checked="checked" value="113" name="SUPP28">
<input checked="checked" value="114" name="SUPP28">


Normally , HTML3:GetVar("SUPP28") should return an array of strings with
the checked values... e.g. {"112", "113"} if the first two options where
checked.

But now I have the case that getvar only returns the first checked element
as a string - even if multiple are checked.

I also used GetAllVars() to check and the array returned by this method
contains all the correct options.

Any Idea why getvar might fail in this case?

I will now work around this but nevertheless would like to know why this
happens...

Thomas