{% for val in p_val %}
<h4>{{ p_val.get('g_name') }}</h4>
{% for att in p_val.get('atbut') %}
<div class="checkbox">
<label>
<input type="checkbox" name="check" value="attvalue">
{{ att.get('name') }}
</label>
</div>
{% endfor %}
{% endfor %}
Checkbox in HTML and Python
Page 1 of 12 Replies - 523 Views - Last Post: 17 January 2016 - 11:40 PM
#1
Checkbox in HTML and Python
Posted 17 January 2016 - 08:04 PM
I need to make the checkbox responsive (in .HTML file), i.e on select of checkbox the url of the page should get modified and page should get refreshed. Following is my code.
Replies To: Checkbox in HTML and Python
#2
Re: Checkbox in HTML and Python
Posted 17 January 2016 - 08:29 PM
You're going to want to crack open a can of javascript here - Python alone isn't going to do it for you.
#3
Re: Checkbox in HTML and Python
Posted 17 January 2016 - 11:40 PM
To expand on what jon.kiparsky said, Python is being used just to generate the HTML that the client receives. Of course, selecting things on a page is done on the client and the only language you have access to in order to handle such events is Javascript.
Page 1 of 1

New Topic/Question
Reply


MultiQuote



|