in reply to header - javascript

How did it not work?

HTML files (and CGI output) are just text. Please compare the output of one method to the output of the other method. The difference in text output is likely the difference in behaviour.

Replies are listed 'Best First'.
Re^2: header - javascript
by Anonymous Monk on Jul 28, 2013 at 11:30 UTC
    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"}');

      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.

Re^2: header - javascript
by Anonymous Monk on Jul 28, 2013 at 11:26 UTC
    I did not see the javascript code in the HTML...

    I loaded the page, made sure it was a fresh reload, (cleared cache, ect)... checked source code, no javascript in the head.