HTML button works for other browser but it does not work for internet explorer.

<input id="submit1" type="button" value="Add" />
  • Do you mean the HTML doesn't create the button you'd expect? Which version of IE are you running? – moe Dec 7 '15 at 10:59
  • It does not call the function, I am using IE-11, I have written JQuery function, in chrome it works fine but it does not work for explorer – KumarV Dec 7 '15 at 11:00
  • Are you trying to use it as a submit-button? Would it be preferred to use the input as type="submit"? – moe Dec 7 '15 at 11:02
  • Its not a submit button – KumarV Dec 7 '15 at 11:04
  • Have you confirmed the jQuery is IE-compatible? There doesn't seem to be problems with the HTML – moe Dec 7 '15 at 11:05

Given the only code you provide:

<input id="submit1" type="button" value="Add" />

You can click this button but there is no action assigned to it.

Any clicks will propagate up the DOM and trigger other click events.


Update 1 - But you problem is probably how you use jQuery

  • Its something like dis...<script type="text/javascript"> $(document).ready(function () { $('#submit1').click(function(){ }); </script> – KumarV Dec 7 '15 at 11:26
  • Is the jQuery loaded properly before the page loads? You could confirm this e.g. by changing the click action to something like jQuery-type of alert text box and see whether the alert pops up – moe Dec 7 '15 at 11:32
  • $('#submit1').click(function(){console.log("click fired"); }); paste this the console of IE and then click on the button. let us know @vikashkumar – Atish Dipongkor - MVP Dec 7 '15 at 11:48
  • jQuery's ready function can conflict with SharePoint. Use proper SharePoint code: spcaf.com/blog/sp-context-dev-part-6-jquery-vs-sharepoint – Danny '365CSI' Engelman Dec 7 '15 at 12:02
  • @AtishDipongkor, On Clicking the button, function is called.. – KumarV Dec 7 '15 at 12:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.