Side navigation
#8217 closed bug (invalid)
Opened February 09, 2011 02:31AM UTC
Closed February 09, 2011 11:03PM UTC
Last modified February 09, 2011 11:15PM UTC
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;
});
Attachments (0)
Change History (4)
Changed February 09, 2011 02:57AM UTC by comment:1
owner: | → mtnbum |
---|---|
status: | new → pending |
Changed February 09, 2011 09:15PM UTC by comment:2
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?
Changed February 09, 2011 11:03PM UTC by comment:3
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.
Changed February 09, 2011 11:15PM UTC by comment:4
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.