Home > Back-end >  What is the matter form form cannot pass values
What is the matter form form cannot pass values

Time:10-12


<% @ page language="Java" contentType="text/HTML. Charset=utf-8 "pageEncoding=" utf-8 "% & gt;

























/* *
Add records to the * Name
*/
The function to the add () {
Var validate=$(" # add - form "). The form (" validate ");
if(! Validate) {
$. Messenger. Alert (" remind ", please check your input data! "" , "warning");
return;
}
Var data=https://bbs.csdn.net/topics/$(" the add - form "). The serialize ();
$. Ajax ({
url:'../admin/menu/add ',
DataType: 'json,
Type: "post",
Data: data,
Success: the function (data) {
If (data type=='success') {
$. Messenger. Alert (' message ', 'added successfully! ', 'info');
$(' # add - dialog.) dialog (" close ");
}
The else
{
$. Messenger. Alert (' message 'data. MSG,' warning ');
}
}
});
}

/* *
* Name change records
*/
The function edit () {
$(' # wu - form - 2 '). The form (the 'submit' {
Url: "'
Success: the function (data) {
If (data) {
$. Messenger. Alert (' message 'and' submitted to success! ', 'info');
$(' # wu - dialog - 2 '). The dialog (" close ");
}
The else
{
$. Messenger. Alert (' message 'and' submit failure! ', 'info');
}
}
});
}

/* *
* Name delete records
*/
The function the remove () {
$. Messenger. Confirm (' message ', 'sure you want to delete this record? ', function (result) {
If (result) {
Var items=$(' # wu - the datagrid - 2 '). The datagrid (' getSelections');
Var ids=[];
$(items). Each (function () {
Ids. Push (enclosing productid);
});
//alert (ids); return;
$. Ajax ({
Url: "'
Data: "'
Success: the function (data) {
If (data) {
$. Messenger. Alert (' message 'and' deleted successfully! ', 'info');
}
The else
{
$. Messenger. Alert (' message ', 'delete failed! ', 'info');
}
}
});
}
});
}

/* *
* Name to open the add window
*/
The function openAdd () {
$(' # add - form). The form (the 'clear');
$(' # add - dialog.) dialog ({
Closed: false,
Modal: true,
Title: "add menu information,"
Buttons: [{
Text: 'sure,
IconCls: 'icon - ok,
Handler: add
}, {
Text: 'cancel',
IconCls: 'icon - cancel',
Handler: function () {
$(' add - dialog). Dialog (" close ");
}
}]
});
}

/* *
* Name to open the modify window
*/
The function openEdit () {
$(' # wu - form - 2 '). The form (the 'clear');
Var item=$(' # wu - the datagrid - 2 '). The datagrid (" getSelected ");
//alert (item, productid); return;
$. Ajax ({
Url: "'
Data: "'
Success: the function (data) {
If (data) {
$(' # wu - dialog - 2 '). The dialog (" close ");
}
The else {
//the value binding
$(' # wu - form - 2 '). The form (" load ", data)
}
}
});
$(' # wu - dialog - 2 '). The dialog ({
Closed: false,
Modal: true,
Title: "change information",
Buttons: [{
Text: 'sure,
IconCls: 'icon - ok,
Handler: edit
}, {
Text: 'cancel',
IconCls: 'icon - cancel',
Handler: function () {
$(' # wu - dialog - 2 '). The dialog (" close ");
}
}]
});
}

/* *
* Name paging filters
*/
The function pagerFilter (data) {
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related