-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Self-submitting form adds self to history again #3226
Comments
To see this problem, use these 2 page's HTML. load Page1, click "Add Item", hit "Save", and then try to get back to the initial page. You have to hit back 2 times. Page 1: Page 2: |
That's what happens without jQuery Mobile as well, its not a bug. Your button here is causing a request to Thus the first back button press takes you to If you handle your saving through AJAX, you'll just want to prevent that button from actually causing the request from the server. |
Sorry, this response was thinking about another issue I'd been discussing, which is very similar to this one... I'll tweak my response accordingly: Well, if I were doing this on a non-JQM site, I would write it so that it does the request via an AJAX call. I'm purposely NOT writing my own AJAX scripts (or at least, I WAS), presuming that "the JQM way" is to treat things more linearly, and let it manage the AJAXification of the flow. As I'm learning more, though, I'm coming to realize that I cannot presume "the JQM way" is as simple as that. No worries, I'm just plowing ahead, and will come up with a way to deal with it. |
Well, "the JQM way" would be to make navigation as similar to non-AJAX as possible, while giving you all the transitions, styling, and performance enhancements that come from doing the AJAX request. If your goal is to perform an AJAX save that happens in the background and have a response that doesn't act as an actual page, you should really just be doing that as you normally would without jQuery Mobile. |
I don't disagree - but my team lead does (though he's stated that he'd be Thanks! On Tue, Dec 6, 2011 at 4:04 PM, Travis Collins <
|
So is this closable? Not sure what to do with this one. |
There is ongoing discussion going on (I think) for a similar "bug" (#3227), so this is most likely redundant. Closing. |
I am using MS MVC3, and I have a page that contains a form which submits to itself. Upon submitting, the page is added to history, so that the back button now has to be clicked 2 times to get back to the prior page.
The text was updated successfully, but these errors were encountered: