Welcome, Guest
Username: Password: Remember me

TOPIC: Will 'Kill the Post' feature work with Ajax

Will 'Kill the Post' feature work with Ajax 14 Feb 2012 14:01 #1287

  • davidosullivan
  • davidosullivan's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: -3
I am making a site that uses jQuery Mobile and this means all pages are loaded into the first page using ajax- you can see the current version here to see what I mean www.carpaholics.com (it uses jQuery mobile on the desktop too so just view in your dektop browser).When you navigate back in this kind of site, you are actually going back to a page that is already in the DOM so I really don't want it deleted by Cook.

Can you confirm whether this is going to be an issue?
Last Edit: 14 Feb 2012 14:03 by davidosullivan.
The administrator has disabled public write access.

Re: Will 'Kill the Post' feature work with Ajax 14 Feb 2012 14:41 #1295

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
If you use Cook for an Ajax application, maybe you don't use templates at all !!
The communication is very fast in JSON and your layout is designed by your JS interface.

Well, if you keep your HTML templates and call them trough ajax, it is impossible to redirect the URL.

Not a question of cook or not, but because it is AJAX.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Will 'Kill the Post' feature work with Ajax 14 Feb 2012 14:53 #1297

  • davidosullivan
  • davidosullivan's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: -3
Not sure I understand your answer.

Dont quite know if you mean (looking at the example site) whether you think that 'yes it probably will be a problem' or a 'no that probably won't be a problem'?
The administrator has disabled public write access.

Re: Will 'Kill the Post' feature work with Ajax 14 Feb 2012 14:56 #1298

  • davidosullivan
  • davidosullivan's Avatar
  • Offline
  • New Member
  • Posts: 11
  • Thank you received: 1
  • Karma: -3
Its this feature I am worried about...

Quote:
Kill the post
Don't mind anymore about the post, Cook redraw the URL each time a post is submitted. The only exception is when a form submission fails. The post is keeped in order to refills the datas.
(An amelioration is possible here)

Does this just apply to forms or is it all pages?
Last Edit: 14 Feb 2012 14:57 by davidosullivan.
The administrator has disabled public write access.

Re: Will 'Kill the Post' feature work with Ajax 14 Feb 2012 15:16 #1301

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Forms and Toolbar actions.


In your view, if you finish your calls by a jexit(), or something like that for JSON answer, you don't have any redirection who take place. So your result is keeped intact.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.120 seconds

Get Started