Welcome Guest, Not a member yet? Register   Sign In
AJAX and CI
#1

[eluser]sjmiller85[/eluser]
I've done quite a bit of searching with no luck, so here is my dilemma.

First off, I am no AJAX scripter. I've done some reading, but this is my first undertaking, and I could see my future AJAX development with CI either aided or hindered based off this.

Now to the meat and potatoes of my problem. I have script in my header view (in the head section of the view) that goes through the numbers for AJAX. The problem I am having is calling the .php file. With the script embedded within the header, can I use the traditional CI URI of [class]/[function]/[parameters] for the URI to load a php file with AJAX? I try this and it loads the index() function of the [class], which I do not want. If I can't do that, do I just write an external .php script that features no CI functionality? (I tried writing an external function one directory deep within the views directory and was unable to load the form helper or anything else, seems as though this script is excluded from anything CI).

If not, what should I do for the URL parameter in the .open method for my AJAX script and still maintain CI functionality?

While I'm at it, this is confusing the heck out of me, when I try to do an include() with PHP, or js, I cannot ever seem to get the URL right without having to go all the way back to /system/application/etc../etc.. This also bugs the hell out of me. I cannot seem to figure out what directory the views load to so that I could try and include() another file without having to go back to the top directory...

Thank you for your help!


Messages In This Thread
AJAX and CI - by El Forum - 01-12-2009, 11:51 PM
AJAX and CI - by El Forum - 01-13-2009, 12:18 AM
AJAX and CI - by El Forum - 01-13-2009, 08:03 AM
AJAX and CI - by El Forum - 01-13-2009, 09:17 AM
AJAX and CI - by El Forum - 01-13-2009, 10:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB