Link click does nothing after ajax switching?

Posted by Neil on Stack Overflow See other posts from Stack Overflow or by Neil
Published on 2010-03-26T07:40:59Z Indexed on 2010/03/26 7:43 UTC
Read the original article Hit count: 352

Filed under:
|
|

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 earlier 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!

© Stack Overflow or respective owner

Related posts about AJAX

Related posts about html