Title: Form - REST Client (POST,PUT,DELETE,GET) Post by: Daretzki on December 29, 2013, 05:23:44 AM Hello Guys,
First, i would like to thank you for great job. EasyUI is very usefull and complex. I would like to ask about implementation of classical REST Client in EasyUI, similar to simple REST Client in jQuery like below. How to implement it in EasyUI I have simple form with input "name" and "id" and butto Save: Code:
after click btnSave all form's data are serialized with function: Code:
... and than Form's data are updated by function "updatePerson" like below: Code:
Question: How to do it with Form in EasyUI? How to implement REST client like above? Thank you Darek Title: Re: Form - REST Client (POST,PUT,DELETE,GET) Post by: stworthy on December 29, 2013, 05:19:33 PM Please refer to this tutorial http://www.jeasyui.com/tutorial/form/form1.php.
Title: Re: Form - REST Client (POST,PUT,DELETE,GET) Post by: Daretzki on December 30, 2013, 03:26:24 AM Hi,
Thank you. How to modify example above to send REST "PUT" and "DELETE" to modify and delete record (not POST) ? Darek Title: Re: Form - REST Client (POST,PUT,DELETE,GET) Post by: stworthy on December 30, 2013, 05:45:30 PM Most browsers support only GET and POST. When using the form plugin to submit a form, only the 'GET' or 'POST' method are available. Other http methods such as 'PUT', 'DELETE' must be simulated by sending additional parameters in request. Another way to do this is to use native jQuery ajax.
Code: var data = $('#ff').serialize(); |