Answer the question
In order to leave comments, you need to log in
How to use onBlur in Flask?
Hi, I'm trying to make my flask app work onBlur like normal javascript+html.
The task is to run the validation function when moving from one field to another.
So everything works fine:
<p >Enter an email address:</p>
<input type="text" placeholder="Type your email here..." id="myInput" onBlur="getInputValue()">
<button type="button" onclick="getInputValue();">Validate</button>
<script>
function getInputValue(){
// some function
}
</script>
<tr>
<td>{{form.email.label}}</td>
<td>{{render_field(form.email)}}</td>
<td><button type="button" onclick="getInputValue();">check email</button></td>
</tr>
<td>{{render_field(form.email(onBlur_="getInputValue()"))}}</td>
"TypeError: 'Markup' object is not callable"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question