Welcome Guest, Not a member yet? Register   Sign In
i want to use ajax in my view file
#1

[eluser]Mr.CodeIgniter[/eluser]
Hey Every Body ,

I want use ajax in my view

and I will create php file to give me responds

what is best place to put ajax file ?
( controller , view , model , ... )
#2

[eluser]InsiteFX[/eluser]
Head tags in the html view file.

InsiteFX
#3

[eluser]Mr.CodeIgniter[/eluser]
i know that , but i mean the php file
who give me responds
#4

[eluser]mddd[/eluser]
An Ajax response is just like any other CodeIgniter page. Use a model to gather the information, use a view (if necessary) to form the data for output.
If the output is JSON you can probably just return it from the controller without needing a view.
#5

[eluser]Zion.b.y[/eluser]
if you know how to use ajax,
then it is very much the same in CI,
simply in the url (in the ajax call) use the code igniter struction of url's.




Theme © iAndrew 2016 - Forum software by © MyBB