jQWidgets Forums
jQuery UI Widgets › Forums › General Discussions › Using json POST method instead of GET
Tagged: data adapter, dataadapter, get, jqxDataAdapter, json, php, post, property, request, source, type
This topic contains 12 replies, has 3 voices, and was last updated by Peter Stoev 10 years, 1 month ago.
-
Author
-
Hi all,
First of all I really appriciate your work on very useful widgets.
I saw all your widgets using json GET method to retrieve data from PHP.
I want to know is there anyway I can use POST method instead of GET because in my PHP, I am planning to block all GET and REQUEST methods for security purpose.
If it is possible, kindly send me a small example code for JQXgrid or JQXlistbox.Thank you,
Best Regards,
SupunHello Supun,
You just need to set the source object’s type property to ‘POST’ in order to achieve this, e.g.:
var source = { datatype: "json", datafields: [ { name: 'firstname' }, { name: 'lastname' }, { name: 'productname' }, { name: 'quantity', type: 'int' }, { name: 'price', type: 'float' }, { name: 'total', type: 'float' } ], id: 'id', url: "../sampledata/data.php", root: 'data', type: 'POST' };
This is applicable to all widgets that use data adapter for binding.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi Damitar,
Thank you, it is working great!!!!!
Moreover I would like to know explanation about source properties.id: 'id', root: 'data', type: 'POST', async: false, record: "Product"
Also all the properties you have under source.
Hope you understand my question.
Thank you,
SupunHi Supun,
These are all covered in the jqxDataAdapter help topic. Please check it out.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Why is this link not showing in my post??
http://www.jqwidgets.com/community/topic/create-tooltip-for-each-item/Hey Supun,
What do you mean not showing your post? It shows it and shows its answer, too.
Hi Peter,
I mean your editor link tag button not working. I have tried to insert a link with above link button. but it didn’t show up.Hi Supun,
The link works fine for me. Example: jqwidgets.com. Make sure that you write Text in your Link
Hi Supun,
The link button in the Forum’s Toolbar Adds link. Did you type in Text in that link after that? I am 100% sure that you did not.
Hi Peter,
Maybe you are correct.
Lets try again in below line;
If you see this… try to answer this like questionThank You,
SupunHi Supun,
I see the link, so I guess the first time you missed to type the link’s text.
Regards,
Peter -
AuthorPosts
You must be logged in to reply to this topic.