An odd case I'm trying to figure out here. I'm trying to design a mailbox system, and making some of the options ajax-y. Here's the scenario:
We have a page with 2 tabs, inbox and compose. Inbox is a essentially a list of links of the form mailbox.php?msg=xxx. Clicking on the inbox or compose tabs does an ajax switch.
So, let's say we're on an message page: mailbox.php?msg=123
I click on "compose" - it ajax switches to a compose form. I change my mind, click on "inbox" - it goes back to a list of messages.
Note, the url has not changed at this point (all has been done through ajax).
I click on the same message as before. It should go back into that message. However, nothing happens! The url it should go to (mailbox.php?msg=123) IS the url showing in the address bar, but, due to the ea开发者_如何学Pythonrlier ajax activity, it's showing the inbox.
Thoughts on how to resolve this? And, out of curiosity, an explanation? Normally, clicking on a link that takes you to a page you're already on will reload the page.
Thanks!
With jquery you may need to re-bind the event handlers, I think there's a function jquery.live that does this?
Resolved - this had to do with anchor tag showing up in the URL in some cases. Thanks!
精彩评论