am using jquery to bind an event to a text input. The event simply performs an ajax call.
Problem is my code works fine in Firefox, but the event is never triggered in IE6. Heres my code:
</script type="text/javascript" src="/js/jquery/jquery.js"></script>
<script type="text/javascript">
// Turn off caching for Ajax
$.ajaxSetup({
cache: false
});
var ajaxCallURL = "http://<?php echo $_SERVER['HTTP_HOST']; ?>/check";
$(document).ready(function() {
$("#test").change(function() {
alert("Event fired");
$('#result').load(ajaxCallURL,null, function(responseText) {
alert("Ajax call successful");
});
});
});
</script>
<input style="WIDTH: 30em" id="test" name="test" value="" type="text"/>
<div id="result"></div>
After typing in the text box, both alerts are shown in Firefox, but nothing in IE6.
I also should say that the element is being created using Zend_Dojo classes, but i cant see an issue with using Dojo and jQuery as its works fine in Firefox.
Am thinking it must be that the event is never bound to the element in IE due to maybe Dojo is not fully loaded in IE when $(document).ready is called....
Any ideas anyone??
Many thanks