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

[eluser]Deep Arora[/eluser]
I just started with the AJAX stuff and have a dumb question..

I understand that we can check in CI if the request is ajax or not:

Code:
if (IS_AJAX) {

But doesn't this make our overall code lengthy? I mean, now we need to write the same code twice..one the ajax version, and one without ajax?

Second - if javascript is disabled in the broswer, how will we determine if ajax is failed. That is, how do we auto route to without-ajax part of code in case ajax fails for some reason? Because in my view, I will simply call the javascript function. Once it is called, its ajax call..so do i need to determine it in VIEW itself?

I may have more questions, but little help to begin with is appreciated.

Thanks.


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