<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tips for Twits &#187; Uncategorized</title>
	<atom:link href="http://t.wits.sg/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://t.wits.sg</link>
	<description>WARNING: excessive use of this site will increase MP at the expense of HP</description>
	<lastBuildDate>Mon, 14 Jun 2010 01:55:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>EXTJS themed file input field</title>
		<link>http://t.wits.sg/2008/09/01/extjs-themed-file-input-field/</link>
		<comments>http://t.wits.sg/2008/09/01/extjs-themed-file-input-field/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 16:38:14 +0000</pubDate>
		<dc:creator>gaweee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ext]]></category>
		<category><![CDATA[file upload]]></category>
		<category><![CDATA[frontend]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://t.wits.sg/?p=18</guid>
		<description><![CDATA[Theming a file input field has always been notoriously hard. Thanks to the guys who wrote the Ext UploadDialog script, theres now a better and more aesthetically pleasing way to create a file upload. I tried using their script wholesale but ran into some problems with the layout. So i kinda hacked and extracted their [...]]]></description>
			<content:encoded><![CDATA[<p>Theming a file input field has always been notoriously hard. Thanks to the <a href="http://www.max-bazhenov.com/dev/upload-dialog-2.0/index.php" target="_blank">guys who wrote the Ext UploadDialog script</a>, theres now a better and more aesthetically pleasing way to create a file upload. I tried using their script wholesale but ran into some problems with the layout. So i kinda hacked and extracted their Ext.ux.BrowseButton code.</p>
<p>So now you can use it simply with:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">	new Ext.ux.BrowseButton({
		input_name: &quot;uploadfile1&quot;,
		text: &quot;Select a file&quot;
		onInputFileChange: function() {
			alert(&quot;you chose &quot; + this.getInputFile().dom.value);
		}
	})
&nbsp;
	new Ext.ux.TBBrowseButton({
		input_name: &quot;uploadfile2&quot;,
		text: &quot;Select another file&quot;
	})</pre></div></div>

<p>The first chunk of code creates a Browse Button (File Input) control as with the name uploadfile1. and the second chunk of codes creates a <strong>ToolBar</strong> Browse Button with the name uploadfile2.</p>
<p>Hypothetically you should be able to add a ToolBar button but i havent quite gotten a ToolBar Browse Button to fit aesthetically well inside a form. Let me know if you all come up with any examples that do!</p>
<p>Meanwhile, 3 cheers for the <a href="http://www.max-bazhenov.com/dev/upload-dialog-2.0/index.php" target="_blank">guys who wrote the Ext UploadDialog script</a>!!!</p>
<p><strong>Download the jQuery progressbar here: <a href="http://t.wits.sg/downloads/ ext.browsebutton.1.0.zip" target="_blank">EXT Browse Button</a><br />
or view the demo <a href="http://t.wits.sg/misc/EXTBrowseButton/demo.php" target="_blank">here</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://t.wits.sg/2008/09/01/extjs-themed-file-input-field/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
