Frame-Popup selection box (jquery pass JSON array)

Source: Internet
Author: User

Give a button to execute the method

JSON pass-through value
$ ("Body"). On ("click", "#btnsure", function () {
var cblinfo = $.asgetvaluesofctrlname ("gridform_mytable", "Gridsel", "|");
if (Cblinfo.length < 1) {
Alert ("Please select a record");
return false;
}
var usercode = "@sysLoginInfo. User.usercode";
var Surlparam = "&select=1;
var Dlgparam = {
Title: "Select Employee",
Close:function () {
if (Art.dialog.data ("retstatus") = = 101) {
var sellproduct = "";
var retvalue = art.dialog.data ("RetValue");//.split ("^");
$.each (retvalue,function (index, obj) {
Sellproduct = obj. Sellproductcode;
});
var sp = {};
Submit
$.asappexecute (SP, function (Retdata) {
if (Retdata.retstatus = = 108) {
alert (Retdata.retvalue);
$.astablereloaddata (Gconfig.id, queryparams);
}
}, function () {
Alert ("abnormal program");
});
}
}
};
$.asappmodaldialog ("Employee", Surlparam, Dlgparam);
});


Pop-up List page Add button, module Add button action, page Add method
Box selection selling products (preparing for sales contracts)
$ ("Body"). On ("click", "#btnselect", function () {
var info = $.asgetvaluesofctrlname ("gridform_mytable", "Gridsel", "|");
var formData = {};
Formdata.strcodes = info;
Formdata.tablename = "Trainerp_vsellproduct";
Formdata.strwhere = "Sellproductcode";

var sysajaxurl = "/manage/popup/getpopupfordatatable";
var Retinfocheck = Sysdoajaxpost (Sysajaxurl, formData);
if (retinfocheck.retstatus = = 400) {
Art.dialog.data ("Retstatus", "101");
var retvalue = eval ("(" +retinfocheck.retvalue+ ")");
Art.dialog.data ("RetValue", RetValue);
Art.dialog.close ();
} else {
Art.dialog.close ();
}
});

Frame-Popup selection box (jquery pass JSON array)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.