I have a form that has action attribute to the same page. On submitting the form, the same page is reloaded with page content changed based on the value submitted.
But when I refresh the page, Continue Form Submission page is popped up.
How do I disable it?
Here's my HTML form:
<form method="post">
<div class="form-group">
<label for="year" class="col-sm-2 control-label">Select Year:</label>
<div class="col-sm-3">
<select class="form-control" id="year" name="year">
</select>
</div>
<div class="col-sm-2">
<button class="btn btn-primary" type="submit" name="date">Done</button>
</div>
</div>
</form>
Values in select element is populated with JavaScript:
<script type = "text/javascript">
var min = 2014,
max = new Date().getFullYear(),
holiday_dropdown = document.getElementById('year');
// var theMonth = new Date().getMonth();
for (var i = max; i >= min; i--)
{
var opt = document.createElement('option');
opt.value = i;
opt.innerHTML = i;
holiday_dropdown.appendChild(opt);
}
</script>
Route of this page is given as:
$f3->route('GET|POST /leave/report', 'GBD\Internals\Controllers\LeaveController->leaveReportGenerator');
How can I disable this dialog from occuring? Any help is very much appreciated. Thanks.