JQueryMiniUI development tutorial table control table Editing: Dialog Box editing (13th)

Source: Internet
Author: User
Reference example: CRUD: pop-up panel editing 1: Create a pop-up editing Panel & lt; divid & quot; editWindow & quot; class & quot; mini-window & quot; title & quot; window & quot; style & quot; width: pixel PX; & quot; showModal & quot; true & qu


Reference example: CRUD: pop-up panel editing



I. Create a pop-up editing panel

ShowModal = "true" allowResize = "true" allowDrag = "true"
>























Employee account: Name: Salary:
Gender: Age: Date of birth:

Update
Cancel




2. Panel operations

Pop-up loading panel data:

Var editWindow = mini. get ("editWindow ");
EditWindow. show ();
Var form = new mini. Form ("# editform ");
Form. loading ();
$. Ajax ({
Url: "../data/DataService. aspx? Method = GetEmployee & id = "+ row. id,
Success: function (text ){
Var o = mini. decode (text );
Form. setData (o );
Form. unmask ();
},
Error: function (){
Alert ("form loading error ");
}
});
Save submit panel data:
Var form = new mini. Form ("# editform ");
Var o = form. getData ();

Grid. loading ("saving ......");
Var json = mini. encode ([o]);
$. Ajax ({
Url: "../data/DataService. aspx? Method = SaveEmployees ",
Data: {employees: json },
Success: function (text ){

Grid. reload ();
},
Error: function (jqXHR, textStatus, errorThrown ){
Alert (jqXHR. responseText );
}
});

EditWindow. hide ();

Related Article

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.