<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Stickblog</title>
	
	<link>http://the-stickman.com</link>
	<description>Random developer notes</description>
	<lastBuildDate>Thu, 05 Nov 2009 09:07:49 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/StickblogComments" type="application/rss+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Comment on Upload multiple files with a single file element by Quan</title>
		<link>http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/comment-page-10/#comment-1312</link>
		<dc:creator>Quan</dc:creator>
		<pubDate>Thu, 05 Nov 2009 09:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=8#comment-1312</guid>
		<description>form enctype="multipart/form-data" runat="server"&gt;

input id="fileUploadElement" type="file" name="fileUploadElement" runat="server" /&gt;	                

input id="uploadNow" name="uploadNow" type="submit" onclick="return ExecuteUpload()" value="Upload now" /&gt;

/form&gt;  

div style="font-size:75%;margin-left: 10px" id="ListOfFiles"

div style="display:none" id="idHolder"&gt;

%=fileUploadElement.ClientID%&gt;

script type="text/javascript"&gt;
        // Create an instance of the multiSelector class, pass it the output target and the max number of files 
        var multiSelector = new MultiSelector( document.getElementById( 'ListOfFiles' ), 3 );
        // Pass in the file element 
        multiSelector.addElement( document.getElementById(document.getElementById('idHolder').innerHTML));
/script&gt;</description>
		<content:encoded><![CDATA[<p>form enctype=&#8221;multipart/form-data&#8221; runat=&#8221;server&#8221;&gt;</p>
<p>input id=&#8221;fileUploadElement&#8221; type=&#8221;file&#8221; name=&#8221;fileUploadElement&#8221; runat=&#8221;server&#8221; /&gt;	                </p>
<p>input id=&#8221;uploadNow&#8221; name=&#8221;uploadNow&#8221; type=&#8221;submit&#8221; onclick=&#8221;return ExecuteUpload()&#8221; value=&#8221;Upload now&#8221; /&gt;</p>
<p>/form&gt;  </p>
<p>div style=&#8221;font-size:75%;margin-left: 10px&#8221; id=&#8221;ListOfFiles&#8221;</p>
<p>div style=&#8221;display:none&#8221; id=&#8221;idHolder&#8221;&gt;</p>
<p>%=fileUploadElement.ClientID%&gt;</p>
<p>script type=&#8221;text/javascript&#8221;&gt;<br />
        // Create an instance of the multiSelector class, pass it the output target and the max number of files<br />
        var multiSelector = new MultiSelector( document.getElementById( &#8216;ListOfFiles&#8217; ), 3 );<br />
        // Pass in the file element<br />
        multiSelector.addElement( document.getElementById(document.getElementById(&#8217;idHolder&#8217;).innerHTML));<br />
/script&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Upload multiple files with a single file element by Quan</title>
		<link>http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/comment-page-10/#comment-1311</link>
		<dc:creator>Quan</dc:creator>
		<pubDate>Thu, 05 Nov 2009 09:03:21 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=8#comment-1311</guid>
		<description>Nikolaj,

You need to set the attribute runat="server" to the file input tag to be able to retrieve uploaded file. Then in order for the client script to work correctly, you need to generate the ClientID of that server control to be used by multiSelector.addElement method.

What I used is something like this:


	                

  



        // Create an instance of the multiSelector class, pass it the output target and the max number of files 
        var multiSelector = new MultiSelector( document.getElementById( 'ListOfFiles' ), 3 );
        // Pass in the file element 
        multiSelector.addElement( document.getElementById(document.getElementById('idHolder').innerHTML));
    	

The idea is to use a hidden div (idHolder) to hold the ClientID of the server file input control so that the JS script could know its client id.

And then here is the server code to save the uploaded files:

HttpFileCollection uploadedFiles = System.Web.HttpContext.Current.Request.Files;
for (int i = 0; i  0)
    {
        string filePath = @"C:\" + Path.GetFileName(file.FileName);
        file.SaveAs(filePath);
    }
}
 
Hope this helps!

Quan</description>
		<content:encoded><![CDATA[<p>Nikolaj,</p>
<p>You need to set the attribute runat=&#8221;server&#8221; to the file input tag to be able to retrieve uploaded file. Then in order for the client script to work correctly, you need to generate the ClientID of that server control to be used by multiSelector.addElement method.</p>
<p>What I used is something like this:</p>
<p>        // Create an instance of the multiSelector class, pass it the output target and the max number of files<br />
        var multiSelector = new MultiSelector( document.getElementById( &#8216;ListOfFiles&#8217; ), 3 );<br />
        // Pass in the file element<br />
        multiSelector.addElement( document.getElementById(document.getElementById(&#8217;idHolder&#8217;).innerHTML));</p>
<p>The idea is to use a hidden div (idHolder) to hold the ClientID of the server file input control so that the JS script could know its client id.</p>
<p>And then here is the server code to save the uploaded files:</p>
<p>HttpFileCollection uploadedFiles = System.Web.HttpContext.Current.Request.Files;<br />
for (int i = 0; i  0)<br />
    {<br />
        string filePath = @&#8221;C:\&#8221; + Path.GetFileName(file.FileName);<br />
        file.SaveAs(filePath);<br />
    }<br />
}</p>
<p>Hope this helps!</p>
<p>Quan</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Converting latitude and longitude coordinates to map x and y values by A Hospitalist</title>
		<link>http://the-stickman.com/uncategorized/converting-latitude-and-longitude-coordinates-to-map-x-and-y-values/comment-page-1/#comment-1310</link>
		<dc:creator>A Hospitalist</dc:creator>
		<pubDate>Tue, 03 Nov 2009 18:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=212#comment-1310</guid>
		<description>Yes it did save someone else some time! Thanks. We are doing a hospital mapping project to track down hospitalist openings and all the city data is only available in Long and Lat.</description>
		<content:encoded><![CDATA[<p>Yes it did save someone else some time! Thanks. We are doing a hospital mapping project to track down hospitalist openings and all the city data is only available in Long and Lat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on IrDA USB-Serial Controller driver by Rathnam</title>
		<link>http://the-stickman.com/general/irda-usb-serial-controller-driver/comment-page-1/#comment-1309</link>
		<dc:creator>Rathnam</dc:creator>
		<pubDate>Sun, 01 Nov 2009 12:36:35 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=15#comment-1309</guid>
		<description>Thanks!!!</description>
		<content:encoded><![CDATA[<p>Thanks!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on jQuery: Dropping items from a draggable list to a sortable list by Diego Arbelaez</title>
		<link>http://the-stickman.com/web-development/javascript/jquery-dropping-items-from-a-draggable-list-to-a-sortable-list/comment-page-1/#comment-1308</link>
		<dc:creator>Diego Arbelaez</dc:creator>
		<pubDate>Wed, 28 Oct 2009 16:47:27 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/uncategorized/jquery-dropping-items-from-a-draggable-list-to-a-sortable-list/#comment-1308</guid>
		<description>Great! just what i needed... couldnt figure out why i could not drop a DRAGGABLE item in a SORTABLE container until i moved an item from the SORTABLE first... very weird but working now, thanks!</description>
		<content:encoded><![CDATA[<p>Great! just what i needed&#8230; couldnt figure out why i could not drop a DRAGGABLE item in a SORTABLE container until i moved an item from the SORTABLE first&#8230; very weird but working now, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Multiple file uploader: Mootools version by 100 Ajax And JavaScript Techniques</title>
		<link>http://the-stickman.com/web-development/multiple-file-uploader-mootools-version/comment-page-2/#comment-1307</link>
		<dc:creator>100 Ajax And JavaScript Techniques</dc:creator>
		<pubDate>Mon, 26 Oct 2009 15:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/web-development/javascript/multiple-file-uploader-mootools-version/#comment-1307</guid>
		<description>[...] Multiple File Uploader - Mootools Version A script that allows you to create a form in which your visitors can upload more than one file [...]</description>
		<content:encoded><![CDATA[<p>[...] Multiple File Uploader &#8211; Mootools Version A script that allows you to create a form in which your visitors can upload more than one file [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Upload multiple files with a single file element by Bondo2a</title>
		<link>http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/comment-page-10/#comment-1306</link>
		<dc:creator>Bondo2a</dc:creator>
		<pubDate>Sun, 25 Oct 2009 07:35:56 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=8#comment-1306</guid>
		<description>Hi
this is a good example but i think it has one problem about the path when i upload a file it take a fakepath and this problem happened with me and i search about the solution</description>
		<content:encoded><![CDATA[<p>Hi<br />
this is a good example but i think it has one problem about the path when i upload a file it take a fakepath and this problem happened with me and i search about the solution</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Upload multiple files with a single file element by Bozhidar</title>
		<link>http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/comment-page-10/#comment-1305</link>
		<dc:creator>Bozhidar</dc:creator>
		<pubDate>Tue, 20 Oct 2009 05:13:57 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=8#comment-1305</guid>
		<description>Hi,
First I would like to say thanks for the great job!
The script is working fine... but I have a small(big) problem with it when I'm trying to implement it with Adobe Spry Framework 1.6.1. In particular with HTMLPanel Widget.
I have the JS link, HTML part and the initiation script in self contained html(PHP) document and if I load this in any good browser it's working fine.
But when I try to load this file in to Spry HTMLPanel, even with globally and locally TRUE value for "evalScript" (allowed to execute  content inside the HTML fragment you're loading in to the container) it won't initiate the "multi_selector"...


   &lt;div id="cont" class="galleryBoxContaine"&gt;

           CONTENT IS LOADED HERE !!!!!

   


   var container = new Spry.Widget.HTMLPanel("cont", { evalScripts: true });
 

I even try to place everything in between the container manually not loading it through Spry HTMLPanel and it is working ... 
So the problem is not in the page design, CSS rules but in the Spry HTMLPanel! Please if anyone has an idea of what is wrong or how can I run around to make it work I will be very thankful!
Thanks in advance!!!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
First I would like to say thanks for the great job!<br />
The script is working fine&#8230; but I have a small(big) problem with it when I&#8217;m trying to implement it with Adobe Spry Framework 1.6.1. In particular with HTMLPanel Widget.<br />
I have the JS link, HTML part and the initiation script in self contained html(PHP) document and if I load this in any good browser it&#8217;s working fine.<br />
But when I try to load this file in to Spry HTMLPanel, even with globally and locally TRUE value for &#8220;evalScript&#8221; (allowed to execute  content inside the HTML fragment you&#8217;re loading in to the container) it won&#8217;t initiate the &#8220;multi_selector&#8221;&#8230;</p>
<p>   &lt;div id=&quot;cont&#8221; class=&#8221;galleryBoxContaine&#8221;&gt;</p>
<p>           CONTENT IS LOADED HERE !!!!!</p>
<p>   var container = new Spry.Widget.HTMLPanel(&#8221;cont&#8221;, { evalScripts: true });</p>
<p>I even try to place everything in between the container manually not loading it through Spry HTMLPanel and it is working &#8230;<br />
So the problem is not in the page design, CSS rules but in the Spry HTMLPanel! Please if anyone has an idea of what is wrong or how can I run around to make it work I will be very thankful!<br />
Thanks in advance!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Iframes, third-party cookies and the document.domain property by DRR</title>
		<link>http://the-stickman.com/web-development/iframes-third-party-cookies-and-the-documentdomain-property/comment-page-1/#comment-1304</link>
		<dc:creator>DRR</dc:creator>
		<pubDate>Thu, 15 Oct 2009 22:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/web-development/iframes-third-party-cookies-and-the-documentdomain-property/#comment-1304</guid>
		<description>but what if you don't have access to the outside-party javascript?</description>
		<content:encoded><![CDATA[<p>but what if you don&#8217;t have access to the outside-party javascript?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Upload multiple files with a single file element by Mike</title>
		<link>http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/comment-page-10/#comment-1303</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 15 Oct 2009 17:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://the-stickman.com/?p=8#comment-1303</guid>
		<description>Thanks for the code dude, really helpfull</description>
		<content:encoded><![CDATA[<p>Thanks for the code dude, really helpfull</p>
]]></content:encoded>
	</item>
</channel>
</rss>
