in reply to Re: header - javascript
in thread header - javascript

I addded a '' around the {}... then reloaded it, so now I see this in the source code output:
<script type="text/javascript">//<![CDATA[ {-type=>"text/javascript", -src=>"http://ajax.googleapis.com/ajax/libs +/jquery/1.10.2/jquery.min.js"} //]]></script> <script type="text/javascript">//<![CDATA[ {-type=>"text/javascript", -src=>"/path/file1.js"} //]]></script>
So that did not work either.

Code I changed:
from: push(@_extraJSCode, {-type=>"text/javascript", -src=>"http://ajax.goog +leapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"}); to: push(@_extraJSCode, '{-type=>"text/javascript", -src=>"http://ajax.goo +gleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"}');

Replies are listed 'Best First'.
Re^3: header - javascript
by Corion (Patriarch) on Jul 28, 2013 at 11:35 UTC

    Adding single quotes will simply pass things through as strings. I highly doubt that this is what you want to achieve.

    If the Javascript does not get added, you are either not calling the script you think, or the code branch you think, or the array you think you're adding is empty.

    Please show a short (20 lines) self-contained example that exhibits the problem.