<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Prototype Patch</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2006/04/05/prototype-patch/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2006/04/05/prototype-patch/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Barney</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/05/prototype-patch/comment-page-1/#comment-315</link>
		<dc:creator>Barney</dc:creator>
		<pubDate>Tue, 24 Oct 2006 16:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=150#comment-315</guid>
		<description>arung,

No, you cannot use postBody to upload a file, at least not directly.  The default postBody behaviour takes a query-string, which Form.serialize will get you.  My patch is for if you need to send a multi-part body for some reason.  It can also be used to take an arbitrary object and post it&#039;s properties without having to serialize, but that&#039;s kind of a fringe benefit.

You could probably use it to upload a file, but you&#039;d have to get the file content into a JS variable, which would be difficult at best.  Well, not difficult, but it would entail a lot of limitations (like browsers have to allow native access to JS code, which no one in the right mind would ever do).
</description>
		<content:encoded><![CDATA[<p>arung,</p>
<p>No, you cannot use postBody to upload a file, at least not directly.  The default postBody behaviour takes a query-string, which Form.serialize will get you.  My patch is for if you need to send a multi-part body for some reason.  It can also be used to take an arbitrary object and post it's properties without having to serialize, but that's kind of a fringe benefit.</p>
<p>You could probably use it to upload a file, but you'd have to get the file content into a JS variable, which would be difficult at best.  Well, not difficult, but it would entail a lot of limitations (like browsers have to allow native access to JS code, which no one in the right mind would ever do).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arung</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/05/prototype-patch/comment-page-1/#comment-314</link>
		<dc:creator>arung</dc:creator>
		<pubDate>Mon, 23 Oct 2006 07:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=150#comment-314</guid>
		<description>How to fill your postBody??? 
can use postBody to upload file????

Is this right?

new Ajax.Request(url, {
asynchronous : true,
method : &quot;post&quot;,
postBody : Form.getInputs(formName),
onSuccess : function(request)
{ alert(&quot;success&quot;);},
onFialure: function(request) 
{ alert(&quot;fail&quot;);}
});</description>
		<content:encoded><![CDATA[<p>How to fill your postBody???<br />
can use postBody to upload file????</p>
<p>Is this right?</p>
<p>new Ajax.Request(url, {<br />
asynchronous : true,<br />
method : "post",<br />
postBody : Form.getInputs(formName),<br />
onSuccess : function(request)<br />
{ alert("success");},<br />
onFialure: function(request)<br />
{ alert("fail");}<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arung</title>
		<link>https://www.barneyb.com/barneyblog/2006/04/05/prototype-patch/comment-page-1/#comment-313</link>
		<dc:creator>arung</dc:creator>
		<pubDate>Mon, 23 Oct 2006 07:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://barneyb.com/barneyblog/?p=150#comment-313</guid>
		<description>How to fill your postBody??? 
can use postBody to upload file????

Is this right?

new Ajax.Request(url, {
asynchronous : true,
method : &quot;post&quot;,
postBody : Form.getInputs(formName),
onSuccess : function(request)
{ alert(&quot;success&quot;);},
onFialure: function(request) 
{ alert(&quot;fail&quot;);}
});</description>
		<content:encoded><![CDATA[<p>How to fill your postBody???<br />
can use postBody to upload file????</p>
<p>Is this right?</p>
<p>new Ajax.Request(url, {<br />
asynchronous : true,<br />
method : "post",<br />
postBody : Form.getInputs(formName),<br />
onSuccess : function(request)<br />
{ alert("success");},<br />
onFialure: function(request)<br />
{ alert("fail");}<br />
});</p>
]]></content:encoded>
	</item>
</channel>
</rss>
