Search the Community
Showing results for tags 'django'.
-
please add Django framework tutorial when will be upload Django tutorial.
-
Hey w3schools, I am a huge fan of python language and I am currently learning flask. In general there is also a huge community using python for web applications. Have you any plans to add Python (Flask or Django) to w3schools?
-
Hello, I've a problem when I try to send variables (django variables) from html to javascript. My variables contain coordinates, I mean, they are decimals, and when I receive them in the javascript and I show them in console, I've got only the no decimal part of the coordinates. This is my code: Template: <td><button onclick="window.to('{{p.coorx}}','{{p.coory}}')" data-coorx="{{p.coorx}}" data-coory="{{p.coory}}">Ver Pozo</button></td> Javascript: window.to = function(coorx,coory) { var coorx = parseFloat(coorx); var coory = parseFloat(coory); console.log(coorx); console.log(coory);} I'm sure that my error is in the way in what I establish the parameters to send in HTML. I've tried several choices as: <td><button onclick="window.to(" + {{p.coorx}} + "," + {{p.coory}} + ")" data-coorx="{{p.coorx}}" data-coory="{{p.coory}}">Ver Pozo</button></td> But then it gives me an error: Uncaught SyntaxError: Unexpected token } Would anybody know how to solve this problem? Greetings and thank you very much in advance!
- 1 reply
-
- javascript
- variable
-
(and 2 more)
Tagged with: