#8217 closed bug (invalid)
Live on anchor tag / hyperlink
Reported by: | mtnbum | Owned by: | mtnbum |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The code below works in all browsers when the anchor tag is changed to a paragraph tag. As is, the code works in Safari and Internet Explorer, but works only sporadically in Firefox.
$('a.this').live("click", function() {
$.post("thing.php", {
orgID: this.id.substring(5)
}); return true;
});
Change History (4)
comment:1 Changed 12 years ago by
Owner: | set to mtnbum |
---|---|
Status: | new → pending |
comment:2 Changed 12 years ago by
Status: | pending → new |
---|
But that's missing the PHP file, the PHP content is here:
<?php echo '<pre>'; print_r($_POST); echo '</pre>'; ?>
A working test is at:
http://santiamalpineclub.org/jqtest/
And I added a second question. But the main question is, why is Firefox success sporadic when IE and Safari work all the time?
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the report, but this is not a jQuery bug. You are trying to perform an AJAX request without stopping the default action of the link. When the default action occurs, it begins the process of page unloading, which aborts all active AJAX requests. Please use the jQuery Forum for support requests.
comment:4 Changed 12 years ago by
To test your reply I set return to false. That resolves one problem, but not both. The updated code is at:
http://santiamalpineclub.org/jqtest/
I will look to the forum if there is an answer there about how to follow an anchor tag after executing the AJAX. I did not find an example on the main jQuery site.
As per the bug reporting guidelines, please provide a working test case demonstrating this issue.