Welcome Guest, Not a member yet? Register   Sign In
Getting jQuery $.ajax to work.
#2

[eluser]gon[/eluser]
You can pass variables from PHP to Javascript, by generating an inline script in the view, containing global variable definitions for values you need. In this case you would generate the URL in PHP, and pass it into a variable to the view.

This way you can load normal scripts from the public folder. Use the global var in the JS script instead of writing it on the fly.


Messages In This Thread
Getting jQuery $.ajax to work. - by El Forum - 10-28-2008, 02:52 AM
Getting jQuery $.ajax to work. - by El Forum - 10-28-2008, 03:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB