codefossa Posted February 20, 2011 Share Posted February 20, 2011 Well, I wrote a simple posting code to send a message to another page without refreshing. While this works perfectly fine in Firefox, it don't work at all in IE. It acts as if the whole script ain't there. Here's what I got: $(function() { $(".button").click(function() { var message = $("#message").val(); var dataString = "message=" + message; if (message == "") { alert("You must type a message before submitting."); $("#message").focus(); } else { $.ajax ({ type: "POST", url: "/chat/post.php", data: dataString, success: function() { $("#message").val(""); $("#message").focus(); load("/chat/load.php", "chatbox"); } }) } return false; }); }); And here's the HTML to go along with it. <h1>Public Chat</h1> <center> <div class="chatbox_message"> <form method="post" action=""> <input type="text" id="message" name="message" style="width: 92%;" autocomplete="off"> <input type="submit" id="button" name="send" value="Send" style="width: 6%;" class="button"> </form> </div> </center> <div class="chatbox" id="chatbox"></div> Quote Link to comment https://forums.phpfreaks.com/topic/228286-jquery-ie/ Share on other sites More sharing options...
rascle Posted February 21, 2011 Share Posted February 21, 2011 I have a similar problem, I have some JQuery code - I wrote - that works great in Chrome and Firefox but doesnt work at all in IE. It says that there is an error on line 1 in the JQuery code, which is the code taken straight out of www.jquery.com . Any ideas to why this occurs? Quote Link to comment https://forums.phpfreaks.com/topic/228286-jquery-ie/#findComment-1177822 Share on other sites More sharing options...
cssfreakie Posted February 22, 2011 Share Posted February 22, 2011 Uhm this topic is marked solved, but i don't see a solution, please post it Quote Link to comment https://forums.phpfreaks.com/topic/228286-jquery-ie/#findComment-1178033 Share on other sites More sharing options...
codefossa Posted February 24, 2011 Author Share Posted February 24, 2011 Uhm this topic is marked solved, but i don't see a solution, please post it I'm unsure of what the issue may have been. One day it was failing, the next it was working. I don't have constant access to Windows IE, so I can only test once-in-a-while. I guess nothing was wrong with my script, just had a PC issue that was resolved when they restarted the comp or whatever it may have been. Quote Link to comment https://forums.phpfreaks.com/topic/228286-jquery-ie/#findComment-1178993 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.