Welcome Guest, Not a member yet? Register   Sign In
Accesing jQuery from Controller
#2

[eluser]Phil Sturgeon[/eluser]
You cannot call jQuery functions (or any JavaScript) from a server-side language like PHP. PHP (and therefore CodeIgniter) does all its work on the server, JavaScript does all its work on the client-side (the users browser) so the interaction between the two goes like this:

1.) CodeIgniter (PHP) works out which controller and which method to use, which then picks a view file.
2.) A view file includes all sorts of HTML, images, CSS, JavaScript, Flash, etc.
3.) jQuery (JavaScript) can then call another CodeIgniter page via AJAX to get a response in a similar way.

And repeat.


Messages In This Thread
Accesing jQuery from Controller - by El Forum - 08-09-2009, 08:15 PM
Accesing jQuery from Controller - by El Forum - 08-10-2009, 02:11 AM
Accesing jQuery from Controller - by El Forum - 08-10-2009, 08:08 PM
Accesing jQuery from Controller - by El Forum - 08-10-2009, 08:39 PM
Accesing jQuery from Controller - by El Forum - 08-12-2009, 12:52 AM
Accesing jQuery from Controller - by El Forum - 08-12-2009, 01:52 AM
Accesing jQuery from Controller - by El Forum - 08-12-2009, 02:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB