Diff for /loncom/interface/lonhtmlcommon.pm between versions 1.228 and 1.229

version 1.228, 2009/08/03 16:34:16 version 1.229, 2009/08/10 12:32:34
Line 2117  sub inittags { Line 2117  sub inittags {
 }  }
   
   
   # USAGE: scripttag(scriptcode, true/false);
   #
   # EXAMPLES: 
   #  - scripttag("alert('Hello World!')") 
   #
   # NOTES:
   # - works currently only for javascripts
   #
   # OUTPUT: Scriptcode properly enclosed in <script> and CDATA tags (and LC
   # Internal markers if 2nd argument evaluates to true)
   sub scripttag {
       my ($content, $internal) = @_;
       $content = "// BEGIN LON-CAPA Internal\n$content\n// END LON-CAPA Internal" if $internal;
       $content = "\n// <![CDATA[\n$content\n// ]]>\n";
       htmltag("script", $content, {type => "text/javascript"});
       return htmltag("script", $content, {type => "text/javascript"});
   };
   
   
 ##############################################  ##############################################
 ##############################################  ##############################################
   

Removed from v.1.228  
changed lines
  Added in v.1.229


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>