Skip to content


Jquery Mobile forms do not call onsubmit in Internet Explorer 7 #2993

dgregg opened this Issue · 11 comments

4 participants


I have a simple page (below) that does not call the onsubmit event when I click the submit button in IE7. Submit works in all other browsers (IE8, Firefox, Chrome, Safari ...) - not in IE7. Submit works in IE7 with regular JQuery but breaks with JQuery mobile. The simple form below should alert "submitting" when the form is submitted, then cancel the form submission.

<!DOCTYPE html>




<link href="" rel="stylesheet"
type="text/css" />

<script src=";&gt;&lt;/script>

<script src=";&gt;&lt;/script>



<!-- Start of first page -->

<div data-role="page" id="login" data-theme="c">

<div data-role="header" data-theme="b" id="hdrMain" name="hdrMain" data-nobackbtn="true">


</div><!-- /header -->

<div data-role="content" id="contentMain" name="contentMain">

<div class="round">

<form id="form1" method="post" action='' onsubmit='alert("submitting");return

<div id="tidDiv" data-role="fieldcontain">

<label for="tid" id="tidLabel" name="tidLabel">Username</label>

<input id="tid" name="TID" type="text" />

<label for="pwd" id="pwdLabel" name="pwdLabel">Password</label>

<input id="pwd" name="PWD" type="password" />

<label for="dmd" id="dmnLabel" name="dmnLabel">Domain</label>

<input id="dmd" name="DMD" type="text" />


<input type="submit" data-theme="b" name="submit" value="Login" />




</div><!-- /content -->

</div><!-- /page one -->




You really shouldnt be using inline JS. Also, try naming your submit button something else like "send".


@dgregg Can you also copy that code to a test page at jsbin please?


This is merely a test page. I had inline JS and when it did not work I decided to go as simple as possible. That is when I discovered that IE 7 was ignoring my submit function call, no matter what form I put it in.

@dgregg dgregg closed this
@dgregg dgregg reopened this

Could you try this example: ? I dont have IE7 handy


same problem here but with IE8
this bug isnt fixed yet: #2001

when is JQM fully supporting jquery 1.7 ??

jQuery Foundation member

@dgregg @xchrix

Can you confirm this is still an issue?
If you use data-role="none" to have a native submit buttom, does the problem still occur or not?

jQuery Foundation member


I assume this is a duplicate of #2743 but wait for confirmation (I guess if data-role="none" solves it, it is a duplicate)

@Wilto Wilto was assigned
jQuery Foundation member

@dgregg - Thanks for the response!

Closing this issue as duplicate of #2743.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.