Cool. But change the variable name! It's not an array, it's an object. Two
very different things in JavaScript.
Calling it an array will just lead to confusion. :-)
-Mike
On Wed, Sep 30, 2009 at 7:02 AM, Poloman wrote:
>
> owesome just what i need to learn. Thank you very much
>
> On Sep 30, 8
owesome just what i need to learn. Thank you very much
On Sep 30, 8:05 pm, Karl Swedberg wrote:
> On Sep 30, 2009, at 1:00 AM, Poloman wrote:
>
>
>
> > Can I get value and text of an option and put them into an array
> > object?
>
> >
> > britney
> > jackson
> >
>
> > I'd l
Sure. it's an object. add this after that code and check out the
result in Firebug or Safari's console:
console.log(arrayob);
What exactly do you want to do with the object after you've created
and populated it?
--Karl
On Sep 30, 2009, at 9:35 AM, runrunforest wrote:
I try your code,
well first of all you use the word "array" but then you describe
something that's not actually an "array."
The code looks fine to me, and will in fact produce an object.
On Wed, Sep 30, 2009 at 8:35 AM, runrunforest wrote:
>
> I try your code, the result is: [object Object]
>
> On Sep 30, 8:05
I try your code, the result is: [object Object]
On Sep 30, 8:05 pm, Karl Swedberg wrote:
> On Sep 30, 2009, at 1:00 AM, Poloman wrote:
>
>
>
> > Can I get value and text of an option and put them into an array
> > object?
>
> >
> > britney
> > jackson
> >
>
> > I'd like to
On Sep 30, 2009, at 1:00 AM, Poloman wrote:
Can I get value and text of an option and put them into an array
object?
britney
jackson
I'd like to have something like this arrayob = {c1:"britner",
c2:"jackson"};
You could do something like this ...
var arrayob = {};
6 matches
Mail list logo