Welcome Guest, Not a member yet? Register   Sign In
AJAX or NO AJAX?
#4

[eluser]Colin Williams[/eluser]
Usually the only difference with an Ajax request is that the output is different.

Code:
$posts = $this->blog->get_posts();
if (IS_AJAX)
{
   echo json_encode($posts);
}
else
{
   $this->load->view('posts', array('posts' => $posts));
}


Messages In This Thread
AJAX or NO AJAX? - by El Forum - 01-15-2010, 01:55 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 03:15 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 03:23 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 03:23 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 06:12 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 06:40 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 06:59 PM
AJAX or NO AJAX? - by El Forum - 01-15-2010, 07:12 PM
AJAX or NO AJAX? - by El Forum - 02-10-2010, 11:59 AM
AJAX or NO AJAX? - by El Forum - 02-11-2010, 06:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB