this does not work
this does not work
there is a way to empty textbox?
<input type="button" onclick="myFunction()" value="Reset form">
<script>
function myFunction() {
document.getElementById("admin_form").reset();
}
</script>
this does not work
<a class="btn btn-default" href="http://www.icagenda.it/connessione-rubrica.html?&srch=" role="button">reset</a>
&srch=
there is a way to empty textbox?
I tried to make a reset button for the filter dropdown.
I planned that when clicking the reset button the values of the dropdowns would reset to the default values and the page would show the database before filtering (as if submit execute with the default empty values).
I planned that when clicking the reset button the values of the dropdowns would reset to the default values and the page would show the database before filtering (as if submit execute with the default empty values).
<div <div class="form-group" id="form-row-multi-2">
<div class="gcore-subinput-container" id="fitem-category">
<div class="gcore-input gcore-sub-input gcore-display-table" id="fin-category">
<select name="fltr[participants][age_category]" id="category" size="" class="form-control" title="" style="" data-load-state="" data-tooltip="" type="text" />
<option value="" selected="selected"></option>
<option value="M 16-29">M 16-29</option>
<option value="M 30-39">M 30-39</option>
<option value="M 40-49">M 40-49</option>
<option value="M 50+">M 50+</option>
<option value="F 16-29">F 16-29</option>
<option value="F 30-39">F 30-39</option>
<option value="F 40-49">F 40-49</option>
<option value="F 50+">F 50+</option>
</select>
<span class="help-block">_CATEGORY_</span></div>
</div>
<div class="gcore-subinput-container" id="fitem-distance">
<div class="gcore-input gcore-sub-input gcore-display-table" id="fin-distance">
<select name="fltr[participants][distance]" id="distance" size="" class="form-control" title="" style="" data-load-state="" data-tooltip="" type="text" />
<option value="" selected="selected"></option>
<option value="Maraton">Maraton</option>
<option value="Cross">Cross</option>
</select>
<span class="help-block">_DISTANCE_</span></div>
</div>
<div class="gcore-subinput-container" id="fitem-submit">
<div class="gcore-input gcore-sub-input gcore-display-table" id="fin-submit">
<input name="submit" id="submit" type="submit" value="_FILTER_" class="btn btn-info" style="" data-load-state="" />
</div>
</div>
<div class="gcore-subinput-container" id="fitem-reset">
<div class="gcore-input gcore-sub-input gcore-display-table" id="fin-reset">
<input name="reset" id="reset" type="reset" value="_RESET_" class="btn btn-warning" style="" data-load-state="" />
</div>
</div>
<div class="clearfix"></div>
</div>
<script>$(document).on('click', 'reset', function(e) {
var opt = $('select').val(0).children('option').filter(function(i){ return this.hasAttribute('selected') });
opt.prop('selected', 'selected');
});</script>
_PAGINATOR_LIST_
<br />
Hi,
Just use a link with an empty fltr variable:
That should work!
Best regards,
Max
Just use a link with an empty fltr variable:
<a class="btn btn-default" href="http://www.icagenda.it/connessione-rubrica.html?&fltr=" role="button">reset</a>
That should work!
Best regards,
Max
This topic is locked and no more replies can be posted.