Answer the question
In order to leave comments, you need to log in
How to pass a value to a script?
Hi
guys, plz tell me how to pass the link value to flask? It’s not very easy to do through the form, because the link parameters are formed dynamically.
I did it like this:
<a href="change" onclick = "send(this)">value/а>, but how to further transfer this value to flask from javascript, I can’t find it properly :(
The ajax option is not suitable The
final task is such that when clicking on the link, the value is passed to flask Flask makes a selection from the database, forms a page with forms, in the fields of which it enters the selected values
Answer the question
In order to leave comments, you need to log in
Well, there is no way without Ajax.
Is it possible to add this value from javascript somewhere and pull it out via request.
<а href="change" onclick = "send(this)" data-some-parameter="value">value</а>
var send = function(scope) {
var value = scope.data('some-parameter');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question