Side navigation
#5141 closed bug (invalid)
Opened August 30, 2009 08:05AM UTC
Closed June 25, 2010 02:41AM UTC
Change event making trouble
Reported by: | kristoffer_lc | Owned by: | brandon |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | event | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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
Attachments (0)
Change History (1)
Changed June 25, 2010 02:41AM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
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?