button not responding when click but when press return key than works

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

button not responding when click but when press return key than works

Asif Khan
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 [hidden email].
To post to this group, send email to [hidden email].
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.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: button not responding when click but when press return key than works

Julio Biason-3
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 <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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.
For more options, visit https://groups.google.com/d/optout.



--
Julio Biason, Sofware Engineer
AZION  |  Deliver. Accelerate. Protect.
Office: <a href="callto:+555130838101" value="+555130838101" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:12.8px" target="_blank">+55 51 3083 8101  |  Mobile: <a href="callto:+5551996209291" style="color:rgb(17,85,204)" target="_blank">+55 51 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 [hidden email].
To post to this group, send email to [hidden email].
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 | Threaded
Open this post in threaded view
|

Re: button not responding when click but when press return key than works

Asif Khan
In reply to this post by Asif Khan
No I am not using JS capturing for any kind of actions. where as my other form button are working.

On Thursday, June 14, 2018 at 2:14:48 AM UTC+5, Asif Khan 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 [hidden email].
To post to this group, send email to [hidden email].
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/5f518cba-fcdc-4b2a-9f75-fad87b0e3cd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: button not responding when click but when press return key than works

Fidel Leon
If I remember correctly, the correct tag for a button is [obviously] <button>, no <buton> (please see the missing T).

El jue., 14 jun. 2018 a las 0:14, Asif Khan (<[hidden email]>) escribió:
No I am not using JS capturing for any kind of actions. where as my other form button are working.

On Thursday, June 14, 2018 at 2:14:48 AM UTC+5, Asif Khan 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 [hidden email].
To post to this group, send email to [hidden email].
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/5f518cba-fcdc-4b2a-9f75-fad87b0e3cd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Fidel Leon
Phone: +34 622 26 44 92

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAHXg%3DN10d1-vfh38-DoEpQrp8Xegv70%3DZh25E%2BbtHQTP253xBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: button not responding when click but when press return key than works

kanishk tanwar
Yea t is missing i suggest use atom it has nice auto completion for the tags :D

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/fc6ea4ad-c16b-4584-9de4-41916f92d463%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: button not responding when click but when press return key than works

Asif Khan
In reply to this post by Fidel Leon
Hi Fidel. thanks to notice such a minute mistake which I did not. Yes it is working now.

On Thursday, June 14, 2018 at 10:53:22 AM UTC+5, Fidel Leon wrote:
If I remember correctly, the correct tag for a button is [obviously] <button>, no <buton> (please see the missing T).

El jue., 14 jun. 2018 a las 0:14, Asif Khan (<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qAPQQqDlBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fas...@...>) escribió:
No I am not using JS capturing for any kind of actions. where as my other form button are working.

On Thursday, June 14, 2018 at 2:14:48 AM UTC+5, Asif Khan 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qAPQQqDlBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qAPQQqDlBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">django...@....
Visit this group at <a href="https://groups.google.com/group/django-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/django-users&#39;;return true;">https://groups.google.com/group/django-users.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/django-users/5f518cba-fcdc-4b2a-9f75-fad87b0e3cd0%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/django-users/5f518cba-fcdc-4b2a-9f75-fad87b0e3cd0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/django-users/5f518cba-fcdc-4b2a-9f75-fad87b0e3cd0%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/django-users/5f518cba-fcdc-4b2a-9f75-fad87b0e3cd0%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


--
Fidel Leon
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="qAPQQqDlBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fi...@...
Phone: +34 622 26 44 92

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/6465fda1-1cf0-4370-8074-ae24c0202370%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.