Javascript nested objects and their properties

[email protected] ("Andy") Wed, 23 Feb 2005 23:40:42 -0000
Newsgroups perl.javascript
Message-ID <001401c51a0f$f80e1030$0b0fa8c0@cpqnx5000>
----- Original Message ----- 
From: "Andy" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Monday, February 21, 2005 10:28 PM
Subject: nested objects and their properties


> Hi,
>
> I am using your module to read within perl some parameters set within the 
> JavaScript.
>
> As documented I can first of all bind to an object within perl like this:
>
> my $doc = new Document();
> $context->bind_object('document', $doc);
>
> and then set the property within JS:
>
> document.value = "some test string";
>
> and then get at the value of the property when back within perl:
>
> $string = $doc->{'value'};
>
> It all works fine. But is there an easy way to work with nested objects? 
> I.e. if my JS has an object called document.myform.parameter1 with a 
> property called value, how do I bind to that so that I can read within 
> perl the value set by JS like this:
> document.myform.parameter1.value = "test string2";
>
>
> Thanks for the help,
>
> andy
>
>
>