PDA

View Full Version : Saving data through form Submission



ArchBytes
16 Nov 2009, 10:46 AM
I'm quite in a blind spot here and I'm not really sure where to go. I've read on form submission in several books and threads, unfortunately it hasn't really helped out. I think the main problem is that I'm not sure how the form submission operations.

I have a form, that has fields in it and a tabpanel. I can load the form with no problem, but I'm not sure how to go about submitting the form. If I use PHP as my backend, should I have a URL ready and waiting to get the data? And if it does, should I still decode the data from the form?

As of now I used the button attribute of the FormPanel:



buttons: [{
text: 'Save',
handler: function(){
tab2.getForm().submit();
}
}, {
text: 'Cancel'
}]


And when I click on the but, I get this exception:

uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://localhost/extjs/adapter/ext/ext-base.js :: i :: line 7" data: no]

Can someone point me in the right direction? Any help is appreciated :)

Thanks,
Emily

Surinder singh
21 Jul 2010, 5:54 PM
i think u are changing the form dynamically. i think there will be a incorrect syntax.

Animal
21 Jul 2010, 11:19 PM
My crystal ball is well attuned these days, and I feel that you are submitting to a domain different from the domain from which the page was read.

http://www.sencha.com/learn/Ext_FAQ_Ajax#.22Permission_denied_to_call_method_XMLHttpRequest.open.22_or_.22Access_to_restricted_URI_denied_.28NS_ERROR_DOM_BAD_URI.29.22