EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 31, 2024, 08:34:06 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Error in save function
Pages: [
1
]
« previous
next »
Print
Author
Topic: Error in save function (Read 9029 times)
marc
Newbie
Posts: 2
Error in save function
«
on:
May 21, 2013, 12:30:10 PM »
Please help, I cant able to save or update any data.
And when I check my firebug console its pointing me on the saveUser function.
Please see the text in yellow.
function saveUser(){
$('#fm').form('submit',{
url: url,
onSubmit: function(){
return $(this).form('validate');
},
success: function(result){
var result = eval('('+result+')');
if (result.success){
$('#dlg').dialog('close'); // close the dialog
$('#dg').datagrid('reload'); // reload the user data
} else {
$.messager.show({
title: 'Error',
msg: result.msg
});
}
}
});
}
Logged
hjzhbb7758
Jr. Member
Posts: 84
Re: Error in save function
«
Reply #1 on:
May 22, 2013, 01:59:07 AM »
Your console output what?
Logged
marc
Newbie
Posts: 2
Re: Error in save function
«
Reply #2 on:
May 22, 2013, 11:49:15 AM »
Quote
SyntaxError: syntax error
[Break On This Error]
(<br>
(line 55, col 1)
Thats what my console said.
Please help
Logged
Kevin
Jr. Member
Posts: 52
Re: Error in save function
«
Reply #3 on:
June 05, 2013, 01:42:44 AM »
Hi Marc
Check what is being returned in your JSON. This is the issue with eval. For example, the following will generate an error;
eval("x=10;y=20;document.writ(x*y)");
This is because of a spelling mistake in the method 'write'.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...