Calling a javascript function from Amazon S3 -


it's simple context: have simple javascript file called myjs.js in amazon s3 bucket, this:

    <script type="text/javascript"> function myfunction() { alert("help my!!"); } </script> 

i want call it, django html template hosted in heroku, this:

   <html>     <head>         <title>calling s3's js heroku </title>             <script type="text/javascript" src="https://s3-sa-east-1.amazonaws.com/js.mybucket/myjs.js"></script>             </head>     <body>          <input type="button" name="test" value="click me" onclick="myfunction()">     </body> </html> 

it doesn't work. way: not mime trouble.

your file shouldn’t contain <script> tags; it’s javascript, not html. (check browser’s console — tell syntax error is.)


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -