in reply to Re5: Creating Advanced Client-Side Applications With Perl
in thread Creating Advanced Client-Side Applications With Perl
One of the problems in your code is that this JavaScript
needs to be translated to this PerlScript:window.document.formname.fieldname.value = 5;
Notice the curlies! The second problem is that JavaScript looks for objects in more places. Eg. It's OK to write the code above like this:$window->{document}->{formname}->{fieldname}->{value} = 5;
since JavaScript searches through the properties of the active window object if it doesn't find a variable of that name. OTOHdocument.formname.fieldname.value = 5;
is not valid.$document->{frm2}->{code}->{value} = 5;
Likewise if I add <div id="foo" name="this is foo">Ahoj</div> into the page and run alert(foo) in JavaScript I get [object]. If I try to run alert($foo); in PerlScript I get nothing. I bet there is a way to get that object, but I don't know how.
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re5: Creating Advanced Client-Side Applications With Perl
by dragonchild (Archbishop) on Apr 19, 2004 at 19:40 UTC | |
by Jenda (Abbot) on Apr 19, 2004 at 19:53 UTC |