Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
That works. Now, if I need a certain page to load another file, I figured I could do this instead:print start_html( ... -script => [{-type=>"text/javascript", -src=>"/p +ath/file1.js"}, {-type=>"text/javascript", -src => "path/file2.js"}, +{-type=>"text/javascript", -src => "$_js_path"}, {-code=> "$jscript"} +], ...
if($otherBlocksOfCode[0]) {# Already created... # push the file1.js to this array... push(@otherBlocksOfCode, {-type=>"text/javascript", -src=>"/path/file1 +.js"}); } else { # No other page created it, so create it now... my @otherBlocksOfCode; push(@otherBlocksOfCode, {-type=>"text/javascript", -src=>"/path/file1 +.js"}); } print start_html( ... -script => [@otherBlocksOfCode, {-type=>"text/ja +vascript", -src => "path/file2.js"}, {-type=>"text/javascript", -src +=> "$_js_path"}, {-code=> "$jscript"}], ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: header - javascript
by Corion (Patriarch) on Jul 28, 2013 at 11:25 UTC | |
by Anonymous Monk on Jul 28, 2013 at 11:30 UTC | |
by Corion (Patriarch) on Jul 28, 2013 at 11:35 UTC | |
by Anonymous Monk on Jul 28, 2013 at 11:26 UTC | |
|
Re: header - javascript
by Anonymous Monk on Jul 28, 2013 at 11:38 UTC | |
by MidLifeXis (Monsignor) on Jul 29, 2013 at 13:09 UTC |