Welcome Guest, Not a member yet? Register   Sign In
validation_errors not showing up with ajax
#5

[eluser]joeizang[/eluser]
hi y'all,

I have been trying to get this figured out and I think I have made some progress, here is what I have:

a) the template library from William Colin works where regions are specified and so only a particular region will be refreshed all the time and not the only page. As a result it sort of works differently from other standard setups for codeigniter. This is definitely getting in the way of jquery getting a response from the server. It gets the bits of template library (i.e. regions) and renders it out which ends up rebuilding the whole page again.

b) When you run the form_validation library, Template doesn't allow you to just load a view the normal way in codeigniter, rather you do this by running:

Code:
$this->template->write_view('contentregion','viewname'); //writes the view
$this->template->render(); //renders the view on screen.

so if this is not done if validation fails, the error messages spat out by the formvalidation library just never seem to get to the view.

I have tried a lot of permutations of using functions that come with this library and still am just able to render out another page of my site. :-S

CONCLUSION:

I think this template library is great but it needs some updating so these issues are met. I will have to look at other templating systems when I have to do a site with a lot of ajax required. Hope Mr. William can see this and help look into this.

Thanks community for an avenue to say what I have learned. Hope this is useful to someone.


Messages In This Thread
validation_errors not showing up with ajax - by El Forum - 06-25-2010, 03:06 PM
validation_errors not showing up with ajax - by El Forum - 06-25-2010, 03:22 PM
validation_errors not showing up with ajax - by El Forum - 06-25-2010, 03:33 PM
validation_errors not showing up with ajax - by El Forum - 06-27-2010, 08:26 AM
validation_errors not showing up with ajax - by El Forum - 06-27-2010, 04:41 PM
validation_errors not showing up with ajax - by El Forum - 06-27-2010, 07:30 PM
validation_errors not showing up with ajax - by El Forum - 06-27-2010, 09:12 PM
validation_errors not showing up with ajax - by El Forum - 06-28-2010, 06:17 AM
validation_errors not showing up with ajax - by El Forum - 06-28-2010, 04:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB