PDA

View Full Version : Error with the submit form sintax error ( ) ext-all.js (line 38)


nunez
08-11-2007, 09:04 PM
Hey Guys!

I start using ext for few month, until now I resolve all the problems with the forum and the API. Without asking for help (lucky LOL ). But now I have this error with the submit.

Work like this.
I click in a button to add the new sale.
A dialog with a form is open and after filling the form, I click submit and is giving me this error in the firebug.

syntax error
chrome://firebug/content/blank.gif( )
ext-all.js (line 38)

Is working fine, insert/update the data in the database without problem, but the browser only show the error in the firebug, but not success or failure message.


formNew.submit({
url:'index.php?modules=clients&link=savedata',
failure: function(f, a) {
Ext.MessageBox.alert('oops', action.result.errorInfo);
},
success: function(f, a) {
Ext.MessageBox.alert('Success', action.result.info);
dialog.hide();
ds.load({params:{start:0, limit:gridSaleSize}});
}
});


In the work around, sometimes I get the two messagebox/alert, (sucess and the failure). In other test I did, I don't get any message.

What i think it is, is the php is not giving me the response like true or false.
I try to resolve, but nothing.

I think is a simple error, but probably somebody with more experience can help me without loosing to much time.

After I get the error, I try to simplify the php, to a simple insert.

if ( $db->Execute($q)==true )
return true;
else
return false;


I appreciate the help.

Thank you.

nunez
08-12-2007, 10:25 AM
I was right, The php was the problem.

The problem was after this, the function returning true/false.
I have a ")" after {success:true/false}


if ( $db->Execute($q)==true )
return true;
else
return false;