if((method.toUpperCase() == 'POST' && this._use_default_post_header) && this._isFormSubmit === false){
this.initHeader('Content-Type', this._default_post_header);
YAHOO.log('Initialize header Content-Type to application/x-www-form-urlencoded; UTF-8 for POST transaction.', 'info', 'Connection');
}
Turns out, this._isFormSubmit was undefined here, so === false turned out to be false. Changing it to !this._isFormSubmit solved the problem.
2 comments:
This was great! I was able to figure out why my YAHOO async request kept dropping the postData when it reached the action.
I tried setting the property: <constant name="struts.url.includeParams" value="all" \/> in struts.xml, but didnt seem to help. Your solution worked.
Have you figured out a way to explicitly set the content-type when making XHRs?
Hi,
I am having similar problems. We are using yui 2.6 and struts 1.2. Client browsers are IE 7, 8 and 9. When the async POST request comes to the action, I don't seem to receive parameters. The problem is this is not happening consistently. The issue is very sporadic.
I tested the _isFormSubmit and it comes false in my development environment. I am still not getting what could be the issue.
Post a Comment