Could someone please tell me why I can't get the following code to work. The javascript doesn't work when embeding html.
Please help tks Anton use Win32::GUI; use Win32::GUI::AxWindow; # Main Window my $user = undef; my $html = undef; get_html(); my $font = Win32::GUI::Font->new( -name => "Times New Roman", -size => 10, -bold => 1 ); my $Window = new Win32::GUI::Window ( -name => "Window", -title => "GlobeLocator Client", -post => [100, 100], -size => [1000, 800], ); # Add a WebBrowser AxtiveX $Control = new Win32::GUI::AxWindow ( -parent => $Window, -name => "Control", -control => "$html", -pos => [0, 0], -size => [400, 400] ); # Register some event $Control->CallMethod("Navigate"); $Window->DrawMenuBar(); $Window->Show(); Win32::GUI::Dialog(); # Main window event handler sub Window_Resize { if (defined $Window) { ($width, $height) = ($Window->GetClientRect)[2..3]; $Control->Move (0, 0); $Control->Resize ($width, $height); } } sub get_html{ ($html = <<HTML) =~ s/^\s+//gm; MSHTML: <html> <head> <title>Your title here</title> <script type = "text/javascript" language = "Javascript"> <!-- Hide from older browsers; alert('Hello World'); } // end hide --> </script> </head> <body > <!-- Insert HTML here --> HELLO WORLD </body> </html> HTML } _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs