CodeIgniter Forums
Flexigrid help - How to add parameters to the Ajax call - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Flexigrid help - How to add parameters to the Ajax call (/thread-11088.html)



Flexigrid help - How to add parameters to the Ajax call - El Forum - 08-25-2008

[eluser]Unknown[/eluser]
Hi,

I started with the Flexigrid and so far it is excellent. I do have a question.

I have a json grid based on a Java servlet and it works great. I am planning to have some dropdowns, textboxes that will have search criteria. How can I send them as some [name, value] parameter to my url?

Tried to get the url to modify and reload, can't see how to go about it.

A simple code example would be a great help!


Thanks,
Kal


Flexigrid help - How to add parameters to the Ajax call - El Forum - 08-26-2008

[eluser]Unknown[/eluser]
I got it to work with the following code-


$('#flex1').flexOptions({params:[{name:'param1', value: val1}, {name:'param2', value: val2}]});

param1 and param2 get set in my request object.


Flexigrid help - How to add parameters to the Ajax call - El Forum - 08-28-2008

[eluser]RaZoR LeGaCy[/eluser]
I was planning to use flexigrid for displaying data returned in a result_array() method. Is this easy using flexigrid?


Flexigrid help - How to add parameters to the Ajax call - El Forum - 10-09-2008

[eluser]GrootBaas[/eluser]
[quote author="Kal" date="1219800146"]I got it to work with the following code-


$('#flex1').flexOptions({params:[{name:'param1', value: val1}, {name:'param2', value: val2}]});

param1 and param2 get set in my request object.[/quote]

Hi there,

How do I read those parameters inside my model or controller?

Thanks in advance for your help ....