Skip to content

Commit

Permalink
Simplify docs for <script> tag generation a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstos committed Nov 20, 2010
1 parent d99997c commit 4baef80
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/CGI.pm
Expand Up @@ -5488,12 +5488,10 @@ Use the B<-noScript> parameter to pass some HTML text that will be displayed on
browsers that do not have JavaScript (or browsers where JavaScript is turned browsers that do not have JavaScript (or browsers where JavaScript is turned
off). off).
The <script> tag, has several attributes including "type", "src" and "charset". The <script> tag, has several attributes including "type", "charset" and "src".
The latter is particularly interesting, as it allows you to keep the "src" allows you to keep JavaScript code in an external file. To use these
JavaScript code in a file or CGI script rather than cluttering up each attributes pass a HASH reference in the B<-script> parameter containing one or
page with the source. To use these attributes pass a HASH reference more of -type, -src, or -code:
in the B<-script> parameter containing one or more of -type, -src, or
-code:
print $q->start_html(-title=>'The Riddle of the Sphinx', print $q->start_html(-title=>'The Riddle of the Sphinx',
-script=>{-type=>'JAVASCRIPT', -script=>{-type=>'JAVASCRIPT',
Expand Down

0 comments on commit 4baef80

Please sign in to comment.