/    Sign up×
Community /Pin to ProfileBookmark

Using split to put in an array.

I am getting an error saying that there is no variable
and the exact line for that error segment is
select_list_array.length();
part of the javascript.

I don’t know why this is giving me an error because I beleive I’ve done everything correctly if I am not mistaken!

Below is the source file.
Please, lend me a helping hand.

[code=html]

<script>
function Select_All_Members( select_list ){
var select_list_array = new Array();
select_list_array = select_list.split(‘;’);

for( var i=1; i <= select_list_array.length(); i++ ){
alert(select_list_array[i]);
//eval(“document.InputForm.” + select_list_array[i] +”.checked=true”);
}
}

Select_All_Members(‘1;2;3;4;5;6;’);
</script>

[/code]

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceFeb 25.2006 — Should not be this:

.length()

should be this:

.length
Copy linkTweet thisAlerts:
@jamestmfbongauthorFeb 25.2006 — that was relatively easy.

Thanks!

just a quick question, how long have you been developing javascript for?

and where did you learn javascripting from?
Copy linkTweet thisAlerts:
@phpnoviceFeb 25.2006 — Working with JavaScript for over six years. Taught myself from the Netscape 4.7 JavaScript Reference Manual. I have been a programmer for over 27 years, though. ?
Copy linkTweet thisAlerts:
@jamestmfbongauthorFeb 26.2006 — where can I get access to the JavaScript Reference Manual?

As I just found this last month, and it's proven to be extremely useful, can this be the JavaScript Reference Manual? http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/TABLE.asp

Wow, you've been working in the field for a long time.

Do you say you bring enough $$ home relative to the work you do, if you don't mind sharing..... I'm thinking of doing something in the computer field.
Copy linkTweet thisAlerts:
@phpnoviceFeb 26.2006 — That is part of MS's [URL=http://msdn.microsoft.com/workshop/author/dhtml/reference/objects.asp]DHTML Object Reference[/URL] -- not a Javascript Reference Manual. I have MS's JavaScript (JScript) Reference Manual on my computer as part of my installation of the MSDN Library -- which comes with things like MS Visual Studio.net, MS Office Professional, or MS FrontPage 2002 or above. MS has apparently done away with their on-line version of the JavaScript (and VBScript) Reference Manuals -- at least, the links I had for them no longer work and I have been unable to find them again since.

I also have the original Netscape Client-side JavaScript v1.3 Reference Manual on my computer. It still comes in handy for some lookups. I have never found as complete nor well organized of a JavaScript Reference Manual than this one. ? I do have the ECMAScript v262 Reference Manual and Browser DOM Reference Manuals on my computer. However, it is very hard to find things in those manuals as they are not well laid out nor well organized. ?

When looking for a current non-MS manual, you must search on ECMAScript -- as I don't think it is really called "JavaScript" anymore.
Copy linkTweet thisAlerts:
@phpnoviceFeb 26.2006 — Wow, you've been working in the field for a long time.

Do you say you bring enough $$ home relative to the work you do, if you don't mind sharing..... I'm thinking of doing something in the computer field.[/QUOTE]

My free-lance contract programming work is part of a small internet-based business I operate on the side. My income from that is only between $5,000 and $10,000 per year. I thank the One True God of Heaven for that, but you can see that would not be enough on which to live. Thus, I also thank the One True God of Heaven for a permanent employment-type position I have as a full-time senior operating systems programmer and analyst which grosses me in excess of $95,000 per year -- all credit, glory, and honor to the One True God of Heaven.

I spend at least 40 hours per week at that and I do spend up to 40 hours per week on my internet-based business, too. At some point, I'd like to go full-time into my internet-based business, but -- obviously -- only when that business has grown to the point where it can effectively replace my employment-type income. ? I also have software (not PC or Internet software) I've been slowly (perhaps, too slowly) developing over the last 25 years which may allow me to also get into the software distribution business at some point -- God willing. ?

Cheers.
×

Success!

Help @jamestmfbong spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...