I have a form that is submitting some data to an external service. It work's in Chrome but the form keeps submitting in IE10. I have looked at this post but the solution is not working.
Here is my javascript code:
$('#scanUrl').submit(function(event){
event.preventDefault();
});
And then I am using jquery-1.11.3.min.js
and my form looks like this:
<form style="margin-left:10%;" id="scanUrl">
<div class="form-group">
<label for="urlHolder" style="color: white; font-size: medium;">URL to Scan:</label>
<input type="text" class="form-control" id="urlHolder" style="width: 40%;">
</div>
<button class="btn btn-primary btn-lg" >Scan</button>
<button class="btn btn-primary btn-lg" id="helpButton">Help</button>
</form>
So I have tried many things (in no specific order):
event.stopPropagation();
if(!event) event = window.event;
event.returnValue = false;
.click()
instead of.submit()
- jquery 1.7 (older version of jquery) I know that 1.x supports IE6+ and 2.x supports IE9+. So I should be able to use 2.x but for safety I am using 1.x
Why is it submitting in IE10?