HighDots Forums  

Re: Please tell me the generic way to check different radio buttongroups?

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: Please tell me the generic way to check different radio buttongroups? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Thomas 'PointedEars' Lahn
 
Posts: n/a

Default Re: Please tell me the generic way to check different radio buttongroups? - 08-04-2004 , 03:08 PM






ivanhoe wrote:
Quote:
Thomas 'PointedEars' Lahn <PointedEars (AT) nurfuerspam (DOT) de> wrote [...]:
But the problem with your code and even with my code is that you always
add elements to the array, even if the required data is already added.
This looks like a problem suited more for Object objects instead of Array
objects [...]

maybe it could be solved by using hashes(associative arrays), instead of
status[status.length] = [t.name, t.value];
one could do
status[name]=value;
so that status always keeps selected values from each name group, no duplicates..
You are talking about Object/user-defined objects which I already mentioned
(yet using `status' as identifier is error-prone, there is a property of the
`window'/global object of that name in browsers). ECMAScript/J(ava)Script
has no built-in concept of associative arrays (as e.g. in PHP) or hashes (Perl).

And please, <http://netmeister.org/news/learn2quote.html>.


PointedEars


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.