in reply to header - javascript
I just added it this way: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"}], ...
and that did work.@_extraJSCode = ({-type=>"text/javascript", -src=>"http://ajax +.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"},); # then at the main header, where it is built, I do this: if($_extraJSCode[0]) { push(@_extraJSCode, {-type=>"text/javascript", -src=>"/path/fi +le1.js"}); } else { @_extraJSCode = ({-type=>"text/javascript", -src=>"/jsfiles/st +_utilities.js"}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: header - javascript
by MidLifeXis (Monsignor) on Jul 29, 2013 at 13:09 UTC |