Are you sure that the javascript file is loaded? Try the link to the javascript file directly.
On Wed, Jun 9, 2010 at 7:10 AM, ravi krishna <ravi.9...@gmail.com> wrote: > Hi, > How can i call an external javascript file in Django. I got a value printed > in my html file from View using templates. Now I want to try out printing a > data in View in html using Javascript ( eg: using onload() ). But the path i > i gave in html file is not passing the values to the js file. > * > MY JAVASCRIPT FILE* ( jsvalu.js ) > function test(a) > { > alert("Hello"); > document.write("The Value is " + a); > } > > *MY HTML FILE* ( the statements regarding the JS file ) > <script type="text/javascript" src="/jsvalue.js"></script> > <input type="button" onclick="test({{latitude}});" value="Click Me" > > > > The error i get from firebug is test() not defined. > Can somebody give me a solution. > > -- > Regards, > Rav! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- -- Dejan Noveski Web Developer dr.m...@gmail.com Twitter: http://twitter.com/dekomote | LinkedIn: http://mk.linkedin.com/in/dejannoveski -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.