Are you sure it's not called?

Try to add

use Win32; Win32::MsgBox("How are you?");
into the subroutine. It seems to me it does get called (IE 6.0.2800.1106), but the code doesn't do anything.

I tried to fix it but I can't find the contentFrame. I tried to use

sub displayObj { my $obj = shift(); Win32::MsgBox("Keys: " . join(', ', map { "$_ => $obj->{$_}" } sor +t keys %$obj )); } ... displayObj( $window); displayObj( $window->{document}); ...
, but I can't find anything.

Quite possibly it would be best to use JavaScript for most of the "client-side" stuff and only call some PerlScript subroutines from the JavaScript.:

<SCRIPT LANGUAGE="PerlScript"> sub DoSelectSite { $window->{document}->{Location} = $window->{document}->Forms( 0 )- +>{SiteSelector}->{Value}; } </SCRIPT> <script language="JavaScript"> function SelectSite () { DoSelectSite(); } </script> <BODY> <P>Select a site to browse.</P> <HR> <FORM> <SELECT NAME="SiteSelector" SIZE = "1" onChange="JavaScript:SelectSite +()"> <OPTION VALUE="">--select one-- <OPTION VALUE="http://www.ncat.edu">North Carolina A and T State Unive +rsity</OPTION> <OPTION VALUE = "http://www.uncg.edu">University of North Carolina at +Greensboro</OPTION> </SELECT> </FORM> </BODY>

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


In reply to Re: Re: Re: Re: Creating Advanced Client-Side Applications With Perl by Jenda
in thread Creating Advanced Client-Side Applications With Perl by epoptai

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.