jQuery not working as expected on HTTPS Internet explorer

Posted by jat on Stack Overflow See other posts from Stack Overflow or by jat
Published on 2012-07-05T11:37:46Z Indexed on 2012/07/10 3:16 UTC
Read the original article Hit count: 126

Filed under:
|
|
|

When I try to run my code on any other webbrowsers apart from the Internet explorer it works fine. But when I try to run the code on Internet explorer I do get an alert box saying HERE along with an Ok button. but the problem is when I click on that OK button I do not get anything. Ideally I should be getting another alert box.

<!DOCTYPE html>
<html>
<head>
    <script src="js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function(){       
        $("#submit").click(function(event) {        
        alert("here");              
        $.post('process.php', {name:'test1',email:'test.com'}, function(data)
        {
            $('#results').html(data);
            alert(data);
        });
      });
    });
    </script>

</head>
<body>
<form name="myform" id="myform" action="" method="POST">
    <label for="name" id="name_label">Name</label>
    <input type="text" name="name" id="name" size="30" value=""/>
    <br>
    <label for="email" id="email_label">Email</label>
    <input type="text" name="email" id="email" size="30" value=""/>
    <br>
    <input type="button" name="submit" id="submit" value="Submit">
</form>
<div id="results"><div>
</body>
</html>

Any help on this is very much appreciated.

Edit: I found out that Internet Explorer which has HTTP works perfectly fine but not on Internet Explorer which uses HTTPS.

© Stack Overflow or respective owner

Related posts about php

Related posts about jQuery