Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Javascript nested objects and their properties

0 views
Skip to first unread message

Andy

unread,
Feb 23, 2005, 6:40:42 PM2/23/05
to perl-ja...@perl.org, cl...@surfar.nu, cl...@contiller.se

----- Original Message -----
From: "Andy" <a...@xygot.com>
To: <perl-javascr...@perl.org>
Cc: <cl...@contiller.se>
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
>
>
>

0 new messages