Welcome Guest, Not a member yet? Register   Sign In
pass javascript variables
#1

[eluser]meera[/eluser]
how to pass javascript variables as argument
to controller.
#2

[eluser]SPeed_FANat1c[/eluser]
You can use jquery post method:

Code:
$.post("test.php", { name: "John", time: "2pm" } );

test.php is your controller, after slash you can add a method, like in browsers adress.
in your controller function you use e.g. $this->input->post('name');

you can read more there: http://api.jquery.com/jQuery.post/




Theme © iAndrew 2016 - Forum software by © MyBB