Ticket #5141 (closed bug: invalid)
Change event making trouble
| Reported by: | kristoffer_lc | Owned by: | brandon |
|---|---|---|---|
| Priority: | major | Milestone: | 1.4 |
| Component: | event | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I have a page where i run a ajax .post() function, every time an input text field changes. I have two input fields running the same ajax script, looking like this:
<input type="text" name="ean1N" id="ean1N" /> <input type="text" name="ean1" id="ean1" />
I have the full jquery 1.3.2 (minified) included to the page, and run a script looking like this:
<script type="text/javascript"> $(document).ready(function(){
$("#ean1N").change(function () {
$("#ean1F").html('<img src="../img/ajax-loader.gif" />'); $.post("product.php", {
navn: document.getElementById('ean1N').value, ean: document.getElementById('ean1').value, num: "1", type: "1"
}, function (data) {
$("#ean1F").html(data);
});
});
$("#ean1").change(function () {
$("#ean1F").html('<img src="../img/ajax-loader.gif" />');
$.post("product.php", {
navn: document.getElementById('ean1N').value, ean: document.getElementById('ean1').value, num: "1", type: "1"
}, function (data) {
$("#ean1F").html(data);
});
});
}); </script>
This all works fine in IE, but in firefox and chrome, if i try to select the last input field, the first input field is selected as soon as i lift my finger from my mouse. I expect this to be a bug in the .change event
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Since this ticket has been open for a while but requires a relatively complex ajax setup to test, I'm going to close this ticket. Can you reduce this to a smaller test case? Does it require both input fields?