check the source of ur web page does it includes the file and path is correct
On Wed, Jun 9, 2010 at 1:16 PM, Dejan Noveski <[email protected]> wrote: > 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 <[email protected]> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<django-users%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > -- > Dejan Noveski > Web Developer > [email protected] > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<django-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

