Side navigation
#1023 closed bug (worksforme)
Opened March 05, 2007 07:48PM UTC
Closed March 25, 2007 11:50PM UTC
Last modified March 15, 2012 05:50PM UTC
IE6: $(form).submit() doesn't trigger attached events by $(form).ajaxForm()
| Reported by: | arikon | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 1.1.3 |
| Component: | ajax | Version: | 1.1.2 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
I'm using this to submit form via ajax request:
$('#news-form').ajaxForm(formOptions);
I have also another two events attached to form submit event:
$('#news-form').submit(function() {
alert(123);
});
$('#news-form').submit(function() {
alert(456);
});
I have buttons in my app with attached events, where I call:
$('#news-form').submit();
But, when I press this buttons, there is no ajax request performed and no other events triggered
Attachments (0)
Change History (3)
Changed March 05, 2007 07:51PM UTC by comment:1
Changed March 07, 2007 10:03PM UTC by comment:2
I had no problems getting this scenario working in IE6. I used the following code:
<html>
<head>
<script src="jquery-1.1.2.js"></script>
<script src="jquery.form.js"></script>
<script type="text/javascript">
$(function() {
$('form').ajaxForm(function(r) {
alert(r);
});
$('form').submit(function() {
alert('1');
});
$('form').submit(function() {
alert('2');
});
$('button').click(function() {
$('form').submit();
});
});
</script>
</head>
<body><div>
<form action="march7.txt">
<input type="text" name="name" />
<input type="submit" />
</form>
<button>Test</button>
</div></body>
</html>
Changed March 25, 2007 11:50PM UTC by comment:3
| need: | → Review |
|---|---|
| resolution: | → worksforme |
| status: | new → closed |
It appears as if Mike has confirmed that this works; marking as "worksforme".
Some addition. Thats all works fine in FF 2.0.0.2, but doesn't work in IE6.