1

I have an MVC3 C# .Net web app. I am firing a javaScript method of a submit button on the onclick event. It works just fine in Firefox, I see the confirm box, but not in IE 8. In IE it is always returning true and not showing the confrim box. Here is the javascript:

<script type="text/javascript">

    function DoCopy() {
      return confirm(($("#myField").val().contains(";" + $("#myOtherField").val() + ";")));
    }
</script>

Here is the button:

<input type="submit" id="thePageSubmit" name="Command" value="Save" onclick="return DoCopy();" /> 

I am using jQuery but even when I use straight javaScript (document.forms[0].elements["myField"]) it works in Firefox but not IE. Any ideas?

MikeTWebb
  • 9,149
  • 25
  • 93
  • 132

1 Answers1

0

I found the answer at this link: It's not compatible in IE string.contains

Compatibility

MikeTWebb
  • 9,149
  • 25
  • 93
  • 132