CodeIgniter Forums

Full Version: javascript
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]meera[/eluser]
How to pass javascript values to controllers.using url arguments..?

El Forum

[eluser]CroNiX[/eluser]
It really depends on what you are doing.

If you are using ajax, you can set post variables and then grab those in your controller using $this->input->post(). You can also just send them in your url (http://mysite.com/mycontroller/method/js...ar2/jsvar3). If you have a specific example Im sure people could give better answers.

El Forum

[eluser]fchristant[/eluser]
Personally I always use posts, as that way I do not run into URL length/encoding issues.