Hi Asif,

Are you sure you don't have any JS capturing the submit press and doing
`preventDefault()`? That would prevent the button from sending the form.

On Firefox, if you inspect the button, if it shows an "EV" near it, it
means there is something capturing the button events -- and `click` could
be one of those events, with the preventDefault().

On Wed, Jun 13, 2018 at 6:14 PM, Asif Khan <fasi...@gmail.com> wrote:

> I am having amazing problem in my django template. Button does not respond
> on pressing click on it. It works when I press return key. code is
> following.
> {% extends 'vtapp/baseapp_layout.html' %}
>
> {% block head %}
> <title>Vehicle Vegilince - Customer Search</title>
> {% endblock %}
>
> {% block content %}
> <h3>Enter Customer information</h3>
> <form method="post" action="{% url 'vtapp:vtsearch' %}">
> {% csrf_token %}
> <div class="form-group">
> <div class="col-lg-5">
> <input type="text" name="custsrh" class="form-control" placeholder="Enter
> CNIC / mobile phone">
> </div>
> <label class="col-lg-2">
> <buton type="submit" class="btn btn-danger">Search</buton>
> </label>
> </div>
> </form>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/ea697019-42b8-4f66-8658-36f26ba3493a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ea697019-42b8-4f66-8658-36f26ba3493a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Julio Biason*, Sofware Engineer
*AZION*  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101 <callto:+555130838101>  |  Mobile: +55 51
<callto:+5551996209291>*99907 0554*

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEM7gE2nBPU4C34996RBrPAmOYvjkEC-8RhL4GeJWX5p%2Bq1G3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to