| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| Johnny's code here is an example of a widget that should probably be updated in time for Leopard due to the change I alluded to earlier. I say 'probably' because the server he's communicating with may be very lenient and not care what content-type header value he's sending even though his request body is name=value pairs. But I would actually recommend the change either way, to be safe, and to be correct. Again, Tiger default content-type from XMLHttpRequest: "application/x-www-form-urlencoded" Leopard default content-type from XMLHttpRequest: "application/xml" I have seen this change break widgets when the server is actually paying attention to what your widget is telling it. Keep in mind that this change in default behavior has been made in the pursuit of greater compatibility with other browsers, and is therefore, very important and necessary. So Johnny, I would recommend adding the following line to the next shipped version of your widget. This change is compatible with Tiger, and will ensure it continues to work with Leopard: post.open("POST", url, false); post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); post.send(variables); Todd Ditchendorf Software Engineer On Aug 28, 2006, at 12:21 PM, Johnny Storm wrote:
|
_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden This email sent to email@hidden
| References: | |
| >parsererror with XmlHtpp-post-request (From: Stephan Huebner <email@hidden>) | |
| >Re: parsererror with XmlHtpp-post-request (From: Russ White <email@hidden>) | |
| >Re: parsererror with XmlHtpp-post-request (From: Stephan Huebner <email@hidden>) | |
| >Re: parsererror with XmlHtpp-post-request (From: Todd Ditchendorf <email@hidden>) | |
| >Re: parsererror with XmlHtpp-post-request (From: Stephan Huebner <email@hidden>) | |
| >Re: parsererror with XmlHtpp-post-request (From: Todd Ditchendorf <email@hidden>) | |
| >Re: Re: parsererror with XmlHtpp-post-request (From: "Johnny Storm" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.