kmullin5016 has asked for the wisdom of the Perl Monks concerning the following question:
I'm just now attempting to put javascript into my perl code using CGI.PM. I've got the appropriate code, so I won't put it here. In IE, it seems to be working fine, but in Mozilla, on the webpage displayed in Mozilla, the first line I see is:
//]]> End script hiding -->
Have I found some kind of browser difference that CGI.PM is sensitive to? I can put the code here if needed.
I think you probably will want to see the code. Also, when I say that in IE its fine, I meant that it doesn't display this anomaly. I do have some problems that I need to correct in my javascript, but that shouldn't affect this. Here is my code that puts the javascript in place.
$JSCRIPT=<<END; <script language="JavaScript"> input.value = max; textarea.focus(); function count(e, textarea, max, input) { if (!e.which) keyCode = event.keyCode; // ie5+ op5+ else keyCode = e.which; // nn6+ if (textarea.value.length<max+1) input.value = max - textarea.value.length; else { textarea.value = textarea.value.substring(0,max); input.value = 0; alert("Text size exceeded, results may be truncated"); return false; } } </script> END print $cgi->start_html( -style=>{'code'=>$STYLE}, -meta=>{ "Security" => "Confidential-Internal", "Description" => "IBM Record of Qwest Secalert", "Keywords" => "secalert,data_collect", "Content-Type" => "text/html; charset=iso-8859-1", "Pubisher" => "IBM Global Services at Qwest" }, -title=>"$title", -script=>$JSCRIPT );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Javascript difference in Mozilla
by Fletch (Bishop) on Mar 30, 2007 at 18:25 UTC | |
|
Re: Javascript difference in Mozilla
by derby (Abbot) on Mar 30, 2007 at 18:48 UTC | |
|
Re: Javascript difference in Mozilla
by un-chomp (Scribe) on Mar 30, 2007 at 22:12 UTC | |
|
Re: Javascript difference in Mozilla
by gam3 (Curate) on Apr 01, 2007 at 12:06 UTC |