Welcome Guest, Not a member yet? Register   Sign In
Ajax and MVC
#5

[eluser]Phil Sturgeon[/eluser]
I really dont think it would be as hard as you guys are making it sound. You have normal pages like every application, then you have some ajax methods in your controllers. So have:

Code:
<?php
function index()
{
//load header, main body and footer
}

function something_ajax()
{
//echo ajax code (the code to go into the div)
}
?>

With a basic sort of templating library like the one I made, a simple $wrap option can be set to make this even easier, stops header and footer showing and all you get is the pure HTML to go back into the div.

Not sure why people make such a fuss about this sort of thing. AJAX is just a way of calling page requests and returning them slightly differently...


Messages In This Thread
Ajax and MVC - by El Forum - 07-11-2007, 12:45 PM
Ajax and MVC - by El Forum - 07-11-2007, 02:34 PM
Ajax and MVC - by El Forum - 07-11-2007, 03:28 PM
Ajax and MVC - by El Forum - 07-12-2007, 10:28 AM
Ajax and MVC - by El Forum - 07-12-2007, 08:39 PM
Ajax and MVC - by El Forum - 07-12-2007, 10:43 PM
Ajax and MVC - by El Forum - 07-13-2007, 01:10 PM
Ajax and MVC - by El Forum - 07-13-2007, 01:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB