Welcome Guest, Not a member yet? Register   Sign In
Using JavaScript within CodeIgniter
#1

[eluser]KeyStroke[/eluser]
I have 2 questions regarding using Javascript within CodeIgniter:

1) Am I supposed to place the JS files in the server root? because if I place them anywhere in the system folder, I can't request them anymore, and get back a 404 error.

2) Am I supposed to use relative or absolute URI's in my AJAX requests? if it's relative, then how does that work?


Appreciate your help Smile
#2

[eluser]xwero[/eluser]
Yes javascript has to be in the public directory of your server but if you use the same file for different applications you can simlink it.

This is a blogpost i've written sometime ago about CI and jQuery but the ajax section is valid for all javascript libraries.
#3

[eluser]Derek Allard[/eluser]
http://video.derekallard.com may help also.




Theme © iAndrew 2016 - Forum software by © MyBB