Insert Data by HTML(jQuery)

Do the example "Insert Data into Simple One Table" and create Database and Endpoint beforehand.

In this example, application will be created to this Endpoint from HTML(jQuery).

Specifically, data can be added into Database by using form as follows:


Item Code: <input id="ItemCodeFormInput" type="text">
Item Name: <input id="ItemNameFormInput" type="text">
Item Description: <textarea id="ItemDescriptionFormInput"></textarea>
<input id="ADD" type="button" value="Add">

Execute following script to this form.

$(function() {
$("#ADD").click(function() { <Define jQuery's click event>
jQuery.ajax( <From here, copy from Template>
type: "POST",
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify({
"TOKEN": "??????",
"param_ItemInfo_ItemCode_insert": $("#ItemCodeFormInput").val(), ← Get Value from Form Input
"param_ItemInfo_ItemName_insert": $("#ItemNameFormInput").val(), Get Value from Form Input
"param_ItemInfo_ItemDescription_insert": $("#ItemDescriptionFormInput").val() ← Get Value from Form Input
success: function(json_result){
if (json_result._status == "OK") {
// Success
} else {
// Failed
error : function() {
// Internal Error
alert("Internal Error");
complete: function() {
); <Until here, copy from Template>

Most of the sending script is as same as template written in Endpoint page. Parameter is read from From Value.
Click "Add" button after input value into form, then data will be inserted into Database.

As you can see, only need is Client side only to write code. Only setting on Cloud is required on Server side.

By doing this, you can dramatically decrease the work effort to develop application.

Back to top

LoginLogin with this Site's User Name (ID)
Quick Login:Quick Login by Facebook ID (Keep Login Option:ON) / Newly Register


© 2016-2024 Matsuesoft Corporation