• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to define global variables that are accessible via javascript

#1
[eluser]chubbypama[/eluser]
I have a ci application that includes some ajax calls. After I call ajax methods, i sometimes dynamically build html forms. I would like to be able to "know" the value of base_url() in my javascript. Someone has suggested that I add global js variable declarations to my index.php file that's in the root of my CI application.
How would I do this?

#2
[eluser]chubbypama[/eluser]
Resolved.

#3
[eluser]TWP Marketing[/eluser]
For posterity and those who search on your title, how did you resolve this?

#4
[eluser]CroNiX[/eluser]
One way...
http://ellislab.com/forums/viewthread/221042/#1018240


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.