[eluser]MonsterTKE[/eluser]
Ok I am 2-3 hours into learning this Librarys API, and so far it is awesome, I have pretty much reimplemented most of the examples to learn from.
This may be a general AJAX question but consider the scenario I have.
1. url. /rating/add/28/up . This is all server side, no post data, I grab some session info and user_id from tank_auth. The /28/up part is sanitized by hand with some if statements.
2. The controller redirects to the base_url on success (ahem, AJAX), or to one of two error pages, a general error, and a "sorry you cant vote twice" page. If they arent logged in it redirects to /auth/login.
So my question is... Can I run that function via AJAX, load the views for the errors if necessary(in an overlay) and here is the kicker, on success, open a comment form in an overlay to submit a comment using all of the validation data I collected when the link was first clicked?
I can probably hack this together using a few different functions and a new form view, Im just hoping there is some easy way to do this.
(I should mention all of the /rating/add/#/up|down links are presented in the view with a foreach, Im assuming I would have to add the $ajax-> methods using a foreach to setup the div ids?)