in reply to CGI, Javascript and Single Quotes
Hmmmm. I don't see the problem ... the following sample code seems to work for me:
#!/usr/local/bin/perl use strict; use warnings; use CGI qw/:standard :html3/; print header; my $test_button = button(-name=>'Test',-value=>'Test Val',-onClick=>"r +eturn test('Testing!');"); print start_html(); print <<JAVASCRIPT; <script> function test (message) { alert(message); } </script> JAVASCRIPT print startform(); print $test_button; print endform(); print end_html();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI, Javascript and Single Quotes
by rashley (Scribe) on Nov 15, 2006 at 18:26 UTC | |
by ptum (Priest) on Nov 15, 2006 at 18:58 UTC |