PDA

View Full Version : syntax error ext-all-debug.js line 4233 character 13



boston-george
25 May 2011, 11:33 PM
Hi guys..

i receive syntax error in ext-all-debug.js line 4233 character 13 when i try to get the value of radio button!
i receive this error only with Internet Explorer, with firefox all done!!




Ext.getCmp(

'frmFieldSet').getForm().submit({

url: '/Project/public/main/action',
success: function(form, action){
alert ('ok');
}
});


how can i solve it??
or how can i take the checked radio button of fieldset form, without getForm().submit() ?

thanks!

fay
26 May 2011, 12:02 AM
Run your code through www.jslint.com (http://www.jslint.com) to ensure that it's valid. When it works in Firefox, but not in IE, it can often be a trailing comma problem - FF will tolerate this, IE won't.

boston-george
26 May 2011, 12:30 AM
thanks for your answer..

i try and i see only this:

Error:Implied global: Ext 1, location 4
Unused variable: form 3 'success', action 3 'success'

now what can i do?

thanks

fay
26 May 2011, 2:32 AM
now what can i do?

Impossible to say without seeing a working showcase (http://www.sencha.com/learn/Ext_Forum_Help#Posting_a_working_showcase) of your code.

boston-george
26 May 2011, 2:45 AM
i hope that this can help you:

this is the form where i get the checked value of radio button



res = Ext.util.JSON.decode(result.responseText);


for (i=0; i<res.sistemiinfo.length; i++) {

Ext.getCmp('fldSisInf').add({
checked: false,
boxLabel: res.sistemiinfo[i].sysinfo.desc,
name: 'sysinfo',

inputValue: res.sistemiinfo[i].sysinfo.lib,
});
}


than when i click a button:


......

listeners: {
click: function(){


Ext.getCmp('frmSisInf').getForm().submit({
url: '/Project/public/main/action',
success: function(form, action){
alert('ok');
}
});
.....
}


thanks for your answer!

fay
26 May 2011, 2:47 AM
First thing is that you've a trailing comma here:



inputValue: res.sistemiinfo[i].sysinfo.lib, // <-- remove
});



But that really isn't a working showcase so it's hard to judge if this is causing the problem.

boston-george
26 May 2011, 2:53 AM
thanks i see that this comma is wrong!
i remove it but still not working :(

there is another way instead of getForm().submit() to get value of checked radio button?

thanks