Arrays
Does anyone know how to fill a out of an array?
Something like:
for (i=0; i < 2; i++)
if (data[i] != null)document.form.WhatDoIPlaceHere?.value = data[i];
thanx in advance,
Shakespeare: onclick || !(onclick)
Does anyone know how to fill a out of an array?
Something like:
for (i=0; i < 2; i++)
if (data[i] != null)document.form.WhatDoIPlaceHere?.value = data[i];
thanx in advance,
Shakespeare: onclick || !(onclick)
Wil posted this at 14:58 — 22nd January 2002.
They have: 601 posts
Joined: Nov 2001
What you using, javascript? I'm guessing that you would use:
for (i=0; i < 2; i++)
if (data[i] != null)document.form.selectname.value = data[i];
Replace selectname with the NAME value of your SELECT tag, i.e., in the following example you would replace selectname with hello.
...
- wil
Jack Michaelson posted this at 12:11 — 23rd January 2002.
He has: 1,733 posts
Joined: Dec 1999
Sorry... using Javascript indeed
Anyway thanx a lot! Didn't use your solution but it made me think of another one
[EDIT:] this is the solution I used, as I wanted the option.value to differ from the item shown:
document.write("<option value="+crunch[j+1]+">"+crunch[j]);
[/EDIT]
Thanx,
Shakespeare: onclick || !(onclick)
Wil posted this at 12:43 — 23rd January 2002.
They have: 601 posts
Joined: Nov 2001
Great!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.