Friday, October 19, 2012

IE Issue -HTML 5 Button with Jquery submit() event


If you are using the HTML 5 button tag and inside it you are calling submit() that is of Jquery, In IE browser you will notice that the event gets trigger 2 times.This seems to be issue with  browser.It works well on Firefox,chrome.

Basically do not use the following syntax inside the form tag  if you are  supporting the IE else you will have to do some trick to avoid first or second call.

@using (Html.BeginForm()){
<button onclick="submit()">"Create"</button>
}

Happy Coding :)

No comments:

Post a Comment