<?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: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/" xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>✩CodeStar✩</title>
	
	<link>http://codestar.wordpress.com</link>
	<description>~Me and my love affair with code :: XHTML, CSS, JavaScript, PHP, ColdFusion, C#, SQL, etc...~</description>
	<lastBuildDate>Sat, 05 Mar 2011 18:45:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain="codestar.wordpress.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>✩CodeStar✩</title>
		<link>http://codestar.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codestar.wordpress.com/osd.xml" title="✩CodeStar✩" />
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/codestar" /><feedburner:info uri="codestar" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://codestar.wordpress.com/?pushpress=hub" /><feedburner:emailServiceId>codestar</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>FCKEditor and Coldfusion link upload and “invalid file type” error</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/Os4udsKbgMs/</link>
		<comments>http://codestar.wordpress.com/2011/03/04/fckeditor-and-coldfusion-link-upload-and-invalid-file-type-error/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 22:21:31 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=236</guid>
		<description><![CDATA[So, by now we&#8217;ve heard about the vulnerabilities of FCKEditor. And of course, being a good CF Developer, you&#8217;ve patched that. Great. Now to business. I followed the helpful advice on so many pages as to how to turn on file upload. I finally got the file attach screen (under the link button mind you), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=236&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, by now we&#8217;ve heard about the vulnerabilities of FCKEditor. And of course, being a good CF Developer, you&#8217;ve patched that. Great. Now to business.</p>
<p>I followed the helpful advice on so many pages as to how to turn on file upload. I finally got the file attach screen (under the link button mind you), and I kept getting invalid file type (or specified, I cannot remember the error).</p>
<p>Frustrated, I did some good old debugging and got back to the config file in \editor\filemanager\connectors\cfm\config.cfm . Within this file, circa line 52, is a line that states:</p>
<blockquote><p>Config.ConfigAllowedTypes 				= &#8220;Image&#8221; ;</p></blockquote>
<p>It is here, young padawan, that you want to change your line to:</p>
<blockquote><p>Config.ConfigAllowedTypes 				= &#8220;Image,File&#8221; ;</p></blockquote>
<p>Tadaa. File uploading complete.</p>
<br />Filed under: <a href='http://codestar.wordpress.com/category/coldfusion/'>ColdFusion</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/236/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/236/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/236/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=236&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/Os4udsKbgMs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2011/03/04/fckeditor-and-coldfusion-link-upload-and-invalid-file-type-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tia</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2011/03/04/fckeditor-and-coldfusion-link-upload-and-invalid-file-type-error/</feedburner:origLink></item>
		<item>
		<title>Favorite JavaScript tools</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/jt85nANQ9GI/</link>
		<comments>http://codestar.wordpress.com/2011/01/19/favorite-javascript-tools/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 14:43:14 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=232</guid>
		<description><![CDATA[There was a time where I hated Javascript. More so, I hated what people were doing with it. Cursor changes, alerts, cursor follower thingys, superfluous popup windows, etc. YUCK. But, a couple of years ago things changed. I learned the beauty of the DOM, XMLHttpRequest, and the ability to change page items on the fly. Since then, I&#8217;ve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=232&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There was a time where I hated Javascript. More so, I hated what people were doing with it. Cursor changes, alerts, cursor follower thingys, superfluous popup windows, etc. YUCK.</p>
<p>But, a couple of years ago things changed. I learned the beauty of the DOM, XMLHttpRequest, and the ability to change page items <em>on the fly</em>. Since then, I&#8217;ve learned the greatness of closures, object oriented Javascript, Regular expressions (although, not limited to JS), and the usefulness of JavaScript libraries.</p>
<p>So, without further ado, here are a few of my favorite JavaScript resources.</p>
<ul>
<li>Resource: <a href="https://developer.mozilla.org/en/javascript">The Mozilla Javascript Documents</a></li>
<li>Resource: <a href="http://www.w3schools.com/js/default.asp">W3 Schools</a></li>
<li>Debugging: <a href="http://getfirebug.com/">Firebug</a></li>
<li>Beautifier: <a href="http://jsbeautifier.org/">JS Unpacker and Beautifier</a></li>
<li>Code Quality tool: <a href="http://www.jslint.com/">JSLint</a></li>
<li>REGEX: <a href="http://www.fileformat.info/tool/regex.htm">Regular expression checker</a></li>
<li>Library: <a href="http://jquery.com/">JQuery</a></li>
<li>Newsgroup:  comp.lang.javascript (despite the spam)</li>
</ul>
<p>Many of these I use daily. What are some of your favorite resources?</p>
<br />Filed under: <a href='http://codestar.wordpress.com/category/javascript/'>Javascript</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=232&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/jt85nANQ9GI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2011/01/19/favorite-javascript-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tia</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2011/01/19/favorite-javascript-tools/</feedburner:origLink></item>
		<item>
		<title>Creating a directory listing with CFTree and CFDirectory</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/ztlzAZhFynk/</link>
		<comments>http://codestar.wordpress.com/2011/01/04/creating-a-directory-listing-with-cftree-and-cfdirectory/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 21:41:53 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Intermediate]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=216</guid>
		<description><![CDATA[My latest endeavor includes creating a selectable tree from directory navigation. Much like that seen on many sites using Java. However, thanks to Coldfusion, this was done quickly and efficiently. Since I didn&#8217;t comment the code, here is what is happening: Set directory file path to a variable Do a recursive listing of all files [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=216&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_229" class="wp-caption alignleft" style="width: 216px"><a href="http://codestar.files.wordpress.com/2011/01/proof.png"><img class="size-full wp-image-229    " style="margin:10px 1px;" title="CFDirectory and CFTree" src="http://codestar.files.wordpress.com/2011/01/proof.png?w=206&#038;h=323" alt="" width="206" height="323" /></a><p class="wp-caption-text">CFDirectory and CFTree</p></div>
<p>My latest endeavor includes creating a selectable tree from directory navigation. Much like that seen on many sites using Java. However, thanks to Coldfusion, this was done quickly and efficiently.</p>
<p>Since I didn&#8217;t comment the code, here is what is happening:</p>
<ul>
<li>Set directory file path to a variable</li>
<li>Do a recursive listing of all files in said directory path</li>
<li>Filter out anything that needs to be filtered out by doing a query of queries. Also setup sort order to look like normal directory listings.</li>
<li>Open the CFForm</li>
<li>Open a CFTree</li>
<li>Set some friendly variables.</li>
<li>If the current record&#8217;s directory doesn&#8217;t have a length, it is a parent item.</li>
<li>If it does have a length, it is a child. (used for the parent attribute)</li>
<li>Close cftree</li>
<li>Close cfform</li>
</ul>
<p>Your file path will be located in the form struct, under the cftree name, as the node value. In this case &#8220;form.foldertree.node&#8221;.</p>
<p>Fin! Auf Wiedersehen!</p>
<p>Enjoy!</p>
<p>*PS: WP took out some characters. I&#8217;ll leave them for you to figure out =P.</p>
<pre class="brush: coldfusion;">
&lt;cfset DirectoryFilePath = 'D:\SOMEFOLDER'&gt;
&lt;cfdirectory directory=&quot;#DirectoryFilePath#&quot; name=&quot;Directories&quot; action=&quot;LIST&quot; recurse=&quot;yes&quot;&gt;
&lt;cfquery name=&quot;Directories&quot; dbtype=&quot;query&quot;&gt;
	SELECT *
	FROM Directories
	WHERE Attributes != 'H'
	ORDER BY Type,Name
&lt;/cfquery&gt;
&lt;cfform name=&quot;directoryForm&quot; format=&quot;html&quot; width=&quot;400&quot; height=&quot;450&quot;&gt;
	&lt;cftree name=&quot;folderTree&quot; completepath=&quot;no&quot; border=&quot;No&quot;&gt;
		&lt;cfoutput query=&quot;Directories&quot;&gt;
			&lt;cfset MainDirectory = Replace(Directory, DirectoryFilePath, '')&gt;
			&lt;cfset Value = MainDirectory &amp; '\' &amp; NAME&gt;
			&lt;cfset Img = 'document'&gt;
			&lt;cfif Type EQ 'DIR'&gt;
				&lt;cfset Img = 'folder'&gt;
			&lt;!--&lt;span class=&quot;hiddenSpellError&quot; pre=&quot;&quot;--&gt;cfif&gt;
			LEN(MainDirectory)&gt;
				&lt;cftreeitem value=&quot;#Value#&quot; display=&quot;#NAME#&quot; expand=&quot;no&quot; img=&quot;#Img#&quot; parent=&quot;folderTree&quot;&gt;
			&lt;cfelse&gt;
				&lt;cftreeitem value = &quot;#Value#&quot; display=&quot;#NAME#&quot; parent = &quot;#MainDirectory#&quot; expand=&quot;no&quot; img=&quot;#img#&quot;&gt;
			&lt;/cfif&gt;
		&lt;/cfoutput&gt;
	&lt;/cftree&gt;
	&lt;input type=&quot;submit&quot; /&gt;
&lt;/cfform&gt;
&lt;cfdump var=&quot;#form#&quot;&gt;
StructIsEmpty(form)&gt;
&lt;cfoutput&gt;#form.foldertree.node#&lt;/cfoutput&gt;
&lt;/cfif&gt;
</pre>
<p>*Exclude .svn folders if you have them, they will cause a mess!</p>
<br />Filed under: <a href='http://codestar.wordpress.com/category/coldfusion/'>ColdFusion</a>, <a href='http://codestar.wordpress.com/category/intermediate/'>Intermediate</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=216&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/ztlzAZhFynk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2011/01/04/creating-a-directory-listing-with-cftree-and-cfdirectory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tia</media:title>
		</media:content>

		<media:content url="http://codestar.files.wordpress.com/2011/01/proof.png" medium="image">
			<media:title type="html">CFDirectory and CFTree</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2011/01/04/creating-a-directory-listing-with-cftree-and-cfdirectory/</feedburner:origLink></item>
		<item>
		<title>Coldfusion structure sorting with QueryNew()</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/Ejxtfncn890/</link>
		<comments>http://codestar.wordpress.com/2010/12/06/coldfusion-structure-sorting-with-querynew/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 16:01:42 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Intermediate]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=204</guid>
		<description><![CDATA[So, there are many, many ways to sort a structure in Coldfusion. You could use the built in StructSort function, or even use Java&#8217;s Hashmap. Alternatively, you could use an Array. However, these weren&#8217;t working for me&#8230; and I needed a quick and dirty solution. Here is what I did. First &#8211; I created a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=204&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, there are many, many ways to sort a structure in Coldfusion. You could use the built in <a href="http://livedocs.adobe.com/coldfusion/8/functions_s_30.html">StructSort function</a>, or even use <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/HashMap.html">Java&#8217;s Hashmap</a>. Alternatively, you could use an Array.</p>
<p>However, these weren&#8217;t working for me&#8230; and I needed a quick and dirty solution.</p>
<p>Here is what I did.</p>
<p>First &#8211; I created a structure with CFScript and gave it an ID (ThisCounter).</p>
<pre class="brush: coldfusion;">

&lt;cfscript&gt;
CartoonRows = StructNew();
ThisCounter = 1;
CartoonRows[ThisCounter++]['cartoonName'] = 'Simpsons';
CartoonRows[ThisCounter++]['cartoonName'] = 'Family Guy';
&lt;/cfscript&gt;
</pre>
<p>Next up was the use of QueryNew() to generate an order-able selection based on my &#8216;ID&#8217;.</p>
<pre class="brush: coldfusion;">
&lt;cfset CartoonColumns = QueryNew('ID,ColumnName,FriendlyName','Integer,VARCHAR,VARCHAR')&gt;
&lt;cfloop collection=&quot;#CartoonRows#&quot; item=&quot;ID&quot;&gt;
&lt;cfset QueryAddRow(CartoonColumns)&gt;
&lt;cfset QuerySetCell(CartoonColumns, 'ID', ID)&gt;
&lt;cfloop collection=&quot;#CartoonRows[ID]#&quot; item=&quot;column&quot;&gt;
&lt;cfset QuerySetCell(CartoonColumns, 'ColumnName', column)&gt;
&lt;cfset QuerySetCell(CartoonColumns, 'FriendlyName', CartoonRows[ID][column])&gt;
&lt;/cfloop&gt;
&lt;/cfloop&gt;
&lt;cfquery name=&quot;CartoonColumns&quot; dbtype=&quot;query&quot;&gt;
SELECT *
FROM CartoonColumns
ORDER BY ID
&lt;/cfquery&gt;
</pre>
<p>And now, of course, much more manipulation can be done since it is indeed a query.<br />
Fin!</p>
<p><em>*ps*: Another alternative would be to use the thiscounter variable above, and use a for loop to loop from 1 to structcount. This will maintain order, but won&#8217;t give you all the yummy goodness of a query.</em></p>
<br />Filed under: <a href='http://codestar.wordpress.com/category/coldfusion/'>ColdFusion</a>, <a href='http://codestar.wordpress.com/category/intermediate/'>Intermediate</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=204&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/Ejxtfncn890" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2010/12/06/coldfusion-structure-sorting-with-querynew/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tia</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2010/12/06/coldfusion-structure-sorting-with-querynew/</feedburner:origLink></item>
		<item>
		<title>Overriding an inline event handler with JQuery</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/CPeAPQV-FRI/</link>
		<comments>http://codestar.wordpress.com/2010/08/10/overriding-an-inline-event-handler-with-jquery/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 14:36:58 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[Quickie]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=200</guid>
		<description><![CDATA[Unfortunately Jquery does not override an inline event handler such as: &#60;a onclick=&#34;...&#34;&#62;&#60;/a&#62; You would first think of the unbind function. However, that function only works for events binded with JQuery. In order to unbind an inline event, set the attribute of the event you want to unbind to nothing. .attr('onclick', '') Filed under: Beginner, Jquery, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=200&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Unfortunately Jquery does not override an inline event handler such as:</p>
<pre class="brush: xml;">&lt;a onclick=&quot;...&quot;&gt;&lt;/a&gt;</pre>
<p>You would first think of the <a href="http://api.jquery.com/unbind/">unbind function</a>. However, that function only works for events binded with JQuery. In order to unbind an inline event, set the attribute of the event you want to unbind to nothing.</p>
<pre class="brush: jscript;">.attr('onclick', '')</pre>
<br />Filed under: <a href='http://codestar.wordpress.com/category/beginner/'>Beginner</a>, <a href='http://codestar.wordpress.com/category/javascript/jquery/'>Jquery</a>, <a href='http://codestar.wordpress.com/category/quickie/'>Quickie</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=200&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/CPeAPQV-FRI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2010/08/10/overriding-an-inline-event-handler-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tia</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2010/08/10/overriding-an-inline-event-handler-with-jquery/</feedburner:origLink></item>
		<item>
		<title>Adding Jquery’s datepicker dynamically</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/K1L56LVJhKs/</link>
		<comments>http://codestar.wordpress.com/2010/07/27/adding-jquerys-datepicker-dynamically/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 20:59:58 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=193</guid>
		<description><![CDATA[One of the more fun things I&#8217;ve gotten to do lately has been to be somewhat of a Javascript Queen. Just kidding of course, but I have gotten to do a lot of great things with both Javascript and JQuery. Of the many problems I have encountered, one that has popped up a few times [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=193&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the more fun things I&#8217;ve gotten to do lately has been to be somewhat of a Javascript Queen. Just kidding of course, but I have gotten to do a lot of great things with both Javascript and JQuery. Of the many problems I have encountered, one that has popped up a few times has been the simple issue of dynamically adding JQuery&#8217;s date picker.</p>
<p><strong>The problem:</strong></p>
<p>I have a datepicker on an input box when the page loads. This works fantastically. However, if adding a new input via the DOM, and continuing with the same class as my previous input box ([class=datepicker]), my newly added input boxes do not have a pretty little datepicker box on click. Now, I&#8217;m sure there is some super duper, easy way to resolve this using the live method, or one of its cousins&#8230; but when you are at a lack of time, sometimes (unfortunately)  efficiency suffers.</p>
<p><strong>My solution:</strong></p>
<p>In the end I ended up grabbing all of the inputs with class datepicker upon each newly added DOM input. I then removed the class that triggers the datepicker from any fields that had it. I also removed the calendar image sitting next to it. Finally, I re-added the datepicker to the inputs.</p>
<pre class="brush: jscript;">
function runDatePicker(){
	var inputs = $('.datepicker');
	$.each(inputs, addPicker);
	function addPicker(){
		if($(this).hasClass('hasDatepicker')){
			$(this).removeClass('hasDatepicker');
			$(this).next('img').remove();
		}
		$(this).datepicker({
			showOn: 'both',
			buttonImage: imagePath + '/calendar.png',
			buttonImageOnly: true,
			numberOfMonths: 3,
			showButtonPanel: true
		});
	}
}
</pre>
<br />Filed under: <a href='http://codestar.wordpress.com/category/intermediate/'>Intermediate</a>, <a href='http://codestar.wordpress.com/category/javascript/'>Javascript</a>, <a href='http://codestar.wordpress.com/category/javascript/jquery/'>Jquery</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=193&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/K1L56LVJhKs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2010/07/27/adding-jquerys-datepicker-dynamically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Tia</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2010/07/27/adding-jquerys-datepicker-dynamically/</feedburner:origLink></item>
		<item>
		<title>Uploading a file and not reloading the page</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/p9IpCxsg2Nk/</link>
		<comments>http://codestar.wordpress.com/2009/12/02/uploading-a-file-and-not-reloading-the-page/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 19:01:16 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Jquery]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=184</guid>
		<description><![CDATA[Today I was tasked with a seemingly simple situation: Create an upload button within a form, submit to the page without reloading, and display the new entry. AJAX was the first thing to come to mind. However.. it didn&#8217;t work. I ended up having to create a hidden iFrame, adjust my form target, and retrieve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=184&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I was tasked with a seemingly simple situation:</p>
<blockquote><p>Create an upload button within a form, submit to the page without reloading, and display the new entry.</p></blockquote>
<p>AJAX was the first thing to come to mind. However.. it didn&#8217;t work. I ended up having to create a hidden iFrame, adjust my form target, and retrieve the result. </p>
<p>Let&#8217;s look at some code tidbits.</p>
<pre class="brush: jscript;">
var iframe;
		try {
		  //O I hate IE &gt;&lt;
		  iframe = document.createElement('&lt;iframe name=&quot;uploadFrame&quot;&gt;&lt;/iframe&gt;');
		} catch (ex) {
		  iframe = document.createElement('iframe');
		  iframe.name = 'uploadFrame';
		}
		var initAction = document.getElementById('skillsForm').action;
		iframe.id = 'uploadFrame';
		iframe.style.display = 'none';
		document.body.appendChild(iframe);
		document.getElementById('skillsForm').target = 'uploadFrame';
		document.getElementById('skillsForm').action = webPath + '/skills/_uploadDoc.cfm';
		document.getElementById('skillsForm').submit();
		document.getElementById('skillsForm').target = '';
		document.getElementById('skillsForm').action = initAction;
</pre>
<p><strong>What&#8217;s going on?</strong><br />
I created an IFrame, got the default action (it was different than my new action), appended the iframe to the body (which this really doesn&#8217;t matter where it is appended to), and manipulated the target. This sent my form off to the correct page and processed it.</p>
<p>To get the result, I used a little Jquery magic =):</p>
<pre class="brush: jscript;">
var fileName = '';
$('#uploadFrame').load( function(){
fileName = $('#uploadFrame').contents().find('#docFileName').html();
...
});
</pre>
<p>Of which this found the element with the id of docFileName and returned to me the text.</p>
<br />Posted in Intermediate, Javascript, Jquery  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/184/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/184/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/184/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=184&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/p9IpCxsg2Nk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2009/12/02/uploading-a-file-and-not-reloading-the-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">beatificfaith</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2009/12/02/uploading-a-file-and-not-reloading-the-page/</feedburner:origLink></item>
		<item>
		<title>Setting up PHP 5 on IIS 5</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/AMplOK3ymlE/</link>
		<comments>http://codestar.wordpress.com/2009/09/04/setting-up-php-5-on-iis-5/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 14:26:47 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=175</guid>
		<description><![CDATA[This was tons of fun, in a few easy steps: **NOTE: I am installing using CGI and not ISAPI Download and unzip PHP package to desired PHP directory (eg: C:\PHP) Add &#8216;;c:\PHP&#8217; (or wherever you stored your PHP directory without quotes) to your PC Path. To get there go to &#8220;my computer&#8221; -&#62; right click [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=175&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This was tons of fun, in a few easy steps:<br />
**NOTE: I am installing using CGI and not ISAPI</p>
<ol>
<li>Download and unzip PHP package to desired PHP directory (eg: C:\PHP)</li>
<li>Add &#8216;;c:\PHP&#8217; (or wherever you stored your PHP directory without quotes) to your PC Path. To get there go to &#8220;my computer&#8221; -&gt; right click &gt; properties &gt; advanced &gt; environement variables &gt; and add to the system variable &#8216;Path&#8217;</li>
<li>Restart your computer</li>
<li>Open IIS</li>
<li>Right click on your site or virtual directory </li>
<li>Make sure execute permissions on the home tab says &#8216;scripts only&#8217;</li>
<li>Click configuration and click add to add the PHP executable</li>
<li>Add &#8216;.php&#8217; as the extension and browse to your php folder and add php-cgi.exe as the executable</li>
<li>Leave everything else the same and click okay a few times&#8230;</li>
<li>Go back up from your home directory and click on web service extension. It is the same level as your website branch.</li>
<li>Right click and go to &#8220;add new web service extension&#8221;</li>
<li>Type PHP as the name and browse to php-cgi.exe for the required file.</li>
<li>Create and test a PHP file!</li>
</ol>
<br />Posted in Beginner, Intermediate, PHP  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=175&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/AMplOK3ymlE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2009/09/04/setting-up-php-5-on-iis-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">beatificfaith</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2009/09/04/setting-up-php-5-on-iis-5/</feedburner:origLink></item>
		<item>
		<title>Coldfusion &amp; Cfouput Group</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/O1i2oeIGgYw/</link>
		<comments>http://codestar.wordpress.com/2009/08/28/coldfusion-cfouput-group/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 21:31:34 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[RTM]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=173</guid>
		<description><![CDATA[I really do like Coldfusion. No, really =). However, here is an ever so useful tip brought to you by me &#8211; CodeStar. So, CFoutput should be on the forefront of every beginner ColdFusion scrip-tor. However, lo- and behold, I wanted to group my results. Simple right? No, not so much. In order to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=173&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I really do like Coldfusion. No, really =).</p>
<p>However, here is an ever so useful tip brought to you by me &#8211; CodeStar.</p>
<p>So, CFoutput should be on the forefront of every beginner ColdFusion scrip-<em>tor</em>.  However, lo- and behold, I wanted to group my results. Simple right? No, not so much. In order to use the group attribute on the <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_m-o_16.html">cfoutput </a>tag, you must use order by&#8230; or else group won&#8217;t work. Ah, the joys and wonders of ColdFusion. Of course although I overlooked this, it <em>is </em>documented in the docs:</p>
<blockquote><p>Use if you retrieved a record set ordered on one or more a query columns.</p></blockquote>
<br />Posted in Beginner, ColdFusion, RTM  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/173/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/173/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/173/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=173&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/O1i2oeIGgYw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2009/08/28/coldfusion-cfouput-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">beatificfaith</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2009/08/28/coldfusion-cfouput-group/</feedburner:origLink></item>
		<item>
		<title>Javascript OOP, event handling, and THIS!</title>
		<link>http://feedproxy.google.com/~r/codestar/~3/GuCEgAFG9dI/</link>
		<comments>http://codestar.wordpress.com/2009/08/14/javascript-oop-event-handling-and-this/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 21:13:56 +0000</pubDate>
		<dc:creator>Tia</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Thanks to Google =P]]></category>

		<guid isPermaLink="false">http://codestar.wordpress.com/?p=167</guid>
		<description><![CDATA[So today as I was oh so joyfully finishing up a project, I ran into another fun (but enlightening) Javascript issue. I have an object, and within that object&#8230; I have methods (nothing special there, huh?). So, I figured that since all of this is so prettily encapsulated, I should have no issues adding an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=167&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So today as I was oh so joyfully finishing up a project, I ran into another fun (but enlightening) Javascript issue.</p>
<p>I have an object, and within that object&#8230; I have methods (nothing special there, huh?). So, I figured that since all of this is so prettily encapsulated, I should have no issues adding an event handler inside my object that would allow me to click and go to a method inside my object.</p>
<p>Woe is me. You see, the &#8216;this&#8217; keyword refers to the parent of the caller. And since I changed the caller from my object to my delightful event handler method, this went to the object that called the event, and not the parent object.</p>
<p>So my problem was &#8211; how do I access all of my properties and other events that are in my parent object, from my method that was actually an input object&#8230; phew.</p>
<p>It did take some work, and some browsing of the Interwebs. Unfortunately, the Interwebs yielded unhelpful and verbose ways to get around what seemed like a simple problem.</p>
<p>I did eventually come across an answer, and here it is &#8211; short, sweet, and to the point (unlike me :p).</p>
<pre class="brush: jscript;">
    var objCopy = this;
    this.myObjMethod.onclick = function(e) {
        objCopy.displayTimes(e);
    };
</pre>
<p>Source: <a href="http://paste.pocoo.org/show/131280/">http://paste.pocoo.org/show/131280/</a></p>
<br />Posted in Advanced, Javascript, Thanks to Google =P  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codestar.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codestar.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codestar.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codestar.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codestar.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codestar.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codestar.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codestar.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codestar.wordpress.com&amp;blog=5191122&amp;post=167&amp;subd=codestar&amp;ref=&amp;feed=1" width="1" height="1" /><img src="http://feeds.feedburner.com/~r/codestar/~4/GuCEgAFG9dI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codestar.wordpress.com/2009/08/14/javascript-oop-event-handling-and-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">beatificfaith</media:title>
		</media:content>
	<feedburner:origLink>http://codestar.wordpress.com/2009/08/14/javascript-oop-event-handling-and-this/</feedburner:origLink></item>
	</channel>
</rss>

