When I have a script like this:
<script> window.onload=function f(){} </script> it is working fine. but when I create an external js file and put it within the static directory, and call the function like this
<script src="{{STATIC_URL}}js/myjs.js"></script>
<script> window.onload=f </script>
It is not working at all. (by the way the url is mapped correctly to the js file "I tested it via viewing the source of the web page")
Any idea?
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/m9Dv6qeozQQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment