<?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>Xavisys&#187; JavaScript</title>
	<atom:link href="http://xavisys.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://xavisys.com</link>
	<description>WordPress Plugins and Custom WordPress Development</description>
	<lastBuildDate>Wed, 16 Nov 2011 20:45:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<atom:link rel='hub' href='http://xavisys.com/?pushpress=hub'/>
		<item>
		<title>Google Maps API</title>
		<link>http://xavisys.com/google-maps-api/</link>
		<comments>http://xavisys.com/google-maps-api/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 16:42:04 +0000</pubDate>
		<dc:creator>Aaron D. Campbell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[xavisys]]></category>

		<guid isPermaLink="false">http://xavisys.com/google-maps-api/</guid>
		<description><![CDATA[I started working some with the Google Maps API, and it&#8217;s pretty nice. The documentation is decent, the examples are good, etc. I realized that I&#8217;ve come to expect this from Google, so I wanted to take the time instead to point out that this is an exceptional product. For example, I began to look [...]]]></description>
			<content:encoded><![CDATA[<p>I started working some with the <a href="http://code.google.com/apis/maps/">Google Maps API</a>, and it&#8217;s pretty nice.  The documentation is decent, the examples are good, etc.  I realized that I&#8217;ve come to expect this from Google, so I wanted to take the time instead to point out that this is an exceptional product.  For example, I began to look into making the scroll wheel zoom on my maps like they do on the Google Maps site.  What does it entail?  One line:
<pre class="brush: jscript; title: ; notranslate">map.enableScrollWheelZoom();</pre>
<p>However, as great of a product as it is, it seems to be lacking some things.  For example, if I want an info window that gives the options to get directions to or from that location, I have to do all that myself.  I have to generate the links, and make them replace the content of the info window with a form that <em>I</em> have to make, and I have to make that form run some JavaScript when executed to get the directions.  Why?  This has GOT to be a common task.  Why not build it into the API?  However, in the end, that pales in comparison to the real problem.  There is no way to validate a Google Maps API key!  Instead, you have to load JavaScript using that key, and it uses an <em>alert</em> to announce that the key was bad!  No one wants a JavaScript alert to pop up on their page!  Since I&#8217;m making a WordPress plugin out of this (teaser!), I needed to make sure that the users of my plugin wouldn&#8217;t have this issue.  I ended up having to override the alert function on the options page for my plugin like this:</p>
<pre class="brush: jscript; title: ; notranslate">var KillAlerts = true;
var realAlert = alert;
var alert = new Function('a', 'if(!KillAlerts){realAlert(a)}');</pre>
<p>Then I added a function that runs on page load, re-enables the alerts, and checks if the key was valid:</p>
<pre class="brush: jscript; title: ; notranslate">function load()
{
    // Re-anable alerts
    KillAlerts = false;

    if (GBrowserIsCompatible()) {
        // Key is valid
    } else {
        if (G_INCOMPAT) {
            // Key is NOT valid.
        } else {
            // Can't tell if the Google API Key is valid, due to the browser not being compatible with the Google Maps API.
        }
    }
}</pre>
<p>There is no reason that it should be that complicated.  They should have a web service where I can send a request to verify a key, or their script should set a global variable rather than send an ugly alert!  In the end, it&#8217;s a great product, but I would have expected that these kind of rough edges would have been taken care of by now.  Google, you make me sad.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://xavisys.com/press-release-xavisys-acquires-attackr-web-development-news-blogs/' title='Press Release: Xavisys Acquires Attackr.com – Web Development News Blogs'>Press Release: Xavisys Acquires Attackr.com – Web Development News Blogs</a></li>
<li><a href='http://xavisys.com/acquia-puts-drupal-in-the-news/' title='Acquia Puts Drupal in the News'>Acquia Puts Drupal in the News</a></li>
<li><a href='http://xavisys.com/all-work-and-no-play/' title='All Work and No Play'>All Work and No Play</a></li>
<li><a href='http://xavisys.com/the-heart-of-open-source/' title='The Heart of Open Source'>The Heart of Open Source</a></li>
<li><a href='http://xavisys.com/a-marketing-strategy-you-can-believe-in/' title='A Marketing Strategy You Can Believe In'>A Marketing Strategy You Can Believe In</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xavisys.com/google-maps-api/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress Script Handling</title>
		<link>http://xavisys.com/wordpress-script-handling/</link>
		<comments>http://xavisys.com/wordpress-script-handling/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 14:00:43 +0000</pubDate>
		<dc:creator>Aaron D. Campbell</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://xavisys.com/wordpress-script-handling/</guid>
		<description><![CDATA[WordPress has some great stuff for handling scripts. You can use wp_enqueue_script() or wp_register_script() to handle scripts. Since there are some scripts that I use so regularly, I decided to automate the process a little more. Basically, I create a js directory inside my template directory, and place the JavaScript files I plan to use [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress has some great stuff for handling scripts.  You can use wp_enqueue_script() or wp_register_script() to handle scripts.  Since there are some scripts that I use so regularly, I decided to automate the process a little more.  Basically, I create a js directory inside my template directory, and place the JavaScript files I plan to use there.  Each can have certain keywords in the comments at the top of the file to set it&#8217;s handle, version, dependencies, as well as whether to enqueue it automatically.  The comments may look something like:</p>
<pre class="brush: jscript; title: ; notranslate">/*
Handle: xavisys
Version: 0.1
Deps: scriptaculous-effects
Enqueue: true
*/

/*
Version: 1.5.4.1
Handle: validation
Deps: scriptaculous-effects
*/

/*
Handle: x_contact
Version: 0.1
Deps: validation
*/</pre>
<p>Basically, if enqueue is set to true, it will automatically load the file.  Otherwise, it will just register it, so that you can use the handle to enqueue it when needed.  All you need to do is add the following code to your functions.php file:<br />
<span id="more-63"></span></p>
<pre class="brush: php; title: ; notranslate">&lt;?php
class handleScripts {
	private static $scripts_to_enqueue = array();
	public static function enqueue_scripts() {
		foreach (self::$scripts_to_enqueue as $handle) {
			wp_enqueue_script($handle);
		}
	}

	public static function register_scripts() {
		$x_js_files = scandir(TEMPLATEPATH.'/js');
		foreach ($x_js_files as $x_js_file) {
			if (strtolower(substr($x_js_file, -3)) == '.js') {
				$x_f_data = file_get_contents(TEMPLATEPATH.&quot;/js/{$x_js_file}&quot;);
				preg_match( &quot;|Handle:(.*)|i&quot;, $x_f_data, $x_js_handle );
				preg_match( &quot;|Version:(.*)|i&quot;, $x_f_data, $x_js_version );
				preg_match( &quot;|Deps:(.*)|i&quot;, $x_f_data, $x_js_deps );
				preg_match( &quot;|Enqueue:(.*)|i&quot;, $x_f_data, $x_js_enqueue );

				$x_js_handle = (isset($x_js_handle[1]))? trim($x_js_handle[1]):basename(strtolower($x_js_file), '.js');
				$x_js_version = (isset($x_js_version[1]))? trim($x_js_version[1]):'1';
				$x_js_deps = (isset($x_js_deps[1]))? preg_split('/\s*,\s*/', trim($x_js_deps[1])) : array();
				$x_js_enqueue = (isset($x_js_enqueue[1]) &amp;&amp; strtolower(trim($x_js_enqueue[1])) == 'true');

				wp_register_script($x_js_handle, get_bloginfo('template_directory').&quot;/js/{$x_js_file}&quot;, $x_js_deps, $x_js_version);
				if ($x_js_enqueue) {
					self::$scripts_to_enqueue[] = $x_js_handle;
				}
			}
		}
	}
}

add_action('init', array('handleScripts','register_scripts'));
add_action('wp_head', array('handleScripts','enqueue_scripts'));</pre>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://xavisys.com/speaking-at-wordcamp-san-francisco-2011/' title='Speaking at WordCamp San Francisco 2011'>Speaking at WordCamp San Francisco 2011</a></li>
<li><a href='http://xavisys.com/wordpress-q-a/' title='WordPress Q &amp; A'>WordPress Q &#038; A</a></li>
<li><a href='http://xavisys.com/google-summer-of-code-2010/' title='Google Summer of Code 2010'>Google Summer of Code 2010</a></li>
<li><a href='http://xavisys.com/wordpress-widget/' title='How To Make Your Own WordPress Widget'>How To Make Your Own WordPress Widget</a></li>
<li><a href='http://xavisys.com/wordpress-core-canonical-plugins/' title='WordPress Core vs Canonical Plugins'>WordPress Core vs Canonical Plugins</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xavisys.com/wordpress-script-handling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Prototype Javascript to set the value of a radio group</title>
		<link>http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/</link>
		<comments>http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 15:09:32 +0000</pubDate>
		<dc:creator>Aaron D. Campbell</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PrototypeJS]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[radio]]></category>

		<guid isPermaLink="false">http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/</guid>
		<description><![CDATA[Not that long ago I wrote Using Prototype Javascript to get the value of a radio group, but I keep getting asked how to set the value of a radio group using prototype JS. Here are a couple ways to do just that. Related Posts: Using Prototype Javascript to get the value of a radio [...]]]></description>
			<content:encoded><![CDATA[<p>Not that long ago I wrote <a href="http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/">Using Prototype Javascript to get the value of a radio group</a>, but I keep getting asked how to <strong>set</strong> the value of a radio group using <a href="http://www.prototypejs.org">prototype JS</a>.  Here are a couple ways to do just that.</p>
<pre class="brush: jscript; title: ; notranslate">$$("input[type=radio][name='radioGroupName'][value='yourDefaultValue']")[0].writeAttribute("checked", "checked");
$("someRadioGroupMember").writeAttribute("checked", "checked");</pre>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/' title='Using Prototype Javascript to get the value of a radio group'>Using Prototype Javascript to get the value of a radio group</a></li>
<li><a href='http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/' title='Properly degrading JavaScript Effects with Script.aculo.us'>Properly degrading JavaScript Effects with Script.aculo.us</a></li>
<li><a href='http://xavisys.com/google-maps-api/' title='Google Maps API'>Google Maps API</a></li>
<li><a href='http://xavisys.com/wordpress-script-handling/' title='Wordpress Script Handling'>WordPress Script Handling</a></li>
<li><a href='http://xavisys.com/writing-a-javascript-date-chooser/' title='My Javascript Date Chooser'>My Javascript Date Chooser</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using Prototype Javascript to get the value of a radio group</title>
		<link>http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/</link>
		<comments>http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/#comments</comments>
		<pubDate>Thu, 01 Mar 2007 18:59:39 +0000</pubDate>
		<dc:creator>Aaron D. Campbell</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PrototypeJS]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[radio]]></category>

		<guid isPermaLink="false">http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/</guid>
		<description><![CDATA[I am constantly asked how to find the value of the selected radio button in a radio group. The way I usually told people was something like this: To use it you need a reference to the radio group (not just a single button), which means you need to know the form, and the radio [...]]]></description>
			<content:encoded><![CDATA[<p>I am constantly asked how to find the value of the selected radio button in a radio group.  The way I usually told people was something like this:</p>
<pre class="brush: jscript; title: ; notranslate">var radioGrp = document['forms']['form_name_or_id']['radio_grp_name'];
for(i=0; i &lt; radioGrp.length; i++){
    if (radioGrp[i].checked == true) {
        var radioValue = radioGrp[i].value;
    }
}
</pre>
<p>To use it you need a reference to the radio group (not just a single button), which means you need to know the form, and the radio group name.  Since I use prototype for almost everything now, I decided to use it to make a simple function for this purpose.  First of all, here is the function:</p>
<pre class="brush: jscript; title: ; notranslate">/**
* Returns the value of the selected radio button in the radio group, null if
* none are selected, and false if the button group doesn't exist
*
* @param {radio Object} or {radio id} el
* OR
* @param {form Object} or {form id} el
* @param {radio group name} radioGroup
*/
function $RF(el, radioGroup) {
    if($(el).type &amp;&amp; $(el).type.toLowerCase() == 'radio') {
        var radioGroup = $(el).name;
        var el = $(el).form;
    } else if ($(el).tagName.toLowerCase() != 'form') {
        return false;
    }

    var checked = $(el).getInputs('radio', radioGroup).find(
        function(re) {return re.checked;}
    );
    return (checked) ? $F(checked) : null;
}</pre>
<p>You can pass it <strong>either</strong> a form (object or id) and a radio group name, <strong>or</strong> a radio button (object or id).</p>
<pre class="brush: jscript; title: ; notranslate">
var value = $RF('radio_btn_id');
var value = $RF('form_id', 'radio_grp_name');
</pre>
<p>Hopefully this will help simplify things for someone.  Maybe they will eventually add something similar into prototype itself.<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/' title='Using Prototype Javascript to set the value of a radio group'>Using Prototype Javascript to set the value of a radio group</a></li>
<li><a href='http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/' title='Properly degrading JavaScript Effects with Script.aculo.us'>Properly degrading JavaScript Effects with Script.aculo.us</a></li>
<li><a href='http://xavisys.com/google-maps-api/' title='Google Maps API'>Google Maps API</a></li>
<li><a href='http://xavisys.com/wordpress-script-handling/' title='Wordpress Script Handling'>WordPress Script Handling</a></li>
<li><a href='http://xavisys.com/writing-a-javascript-date-chooser/' title='My Javascript Date Chooser'>My Javascript Date Chooser</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
		<item>
		<title>Properly degrading JavaScript Effects with Script.aculo.us</title>
		<link>http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/</link>
		<comments>http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 18:07:32 +0000</pubDate>
		<dc:creator>Aaron D. Campbell</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PrototypeJS]]></category>
		<category><![CDATA[Script.aculo.us]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/</guid>
		<description><![CDATA[I recently decided to use Script.aculo.us in a project that I&#8217;m working on. I was actually pretty impressed with it&#8217;s cross-browser compatibility and ease of use. I didn&#8217;t even think that the 200K size (including the Prototype Framework) was that bad. However, I did run into some issues while trying to make my site function [...]]]></description>
			<content:encoded><![CDATA[<p>I recently decided to use <a href="http://script.aculo.us/">Script.aculo.us</a> in a project that I&#8217;m working on.  I was actually pretty impressed with it&#8217;s cross-browser compatibility and ease of use.  I didn&#8217;t even think that the 200K size (including the <a href="http://prototypejs.org/">Prototype Framework</a>) was that bad.  However, I did run into some issues while trying to make my site function properly for users that have JavaScript disabled, while still allowing the effects for those that do.</p>
<p>In my particular situation, I wanted to make some objects appear with an effect.  You will notice that if you apply an Appear effect to an element, it will display, then disappear, the appear with the effect.  The solution is to set an inline style with display:none, except that this will cause the element to be missing from users without JavaScript.  The solution?  Add the display:none style with Javascript.</p>
<p>First, I created a CSS class called effect_appear, with no styles.</p>
<pre class="brush: css; title: ; notranslate">
.effect_appear {
}
</pre>
<p>Then I use Javascript to modify that class, and set the display to none.</p>
<pre class="brush: jscript; title: ; notranslate">
function getStyleClass (className) {
    if (document.styleSheets.length &lt; 1) {
        return null;
    }
    if (document.styleSheets[0].cssRules) {
        var cssRules = 'cssRules';
    } else {
        var cssRules = 'rules';
    }
    for (var s = 0; s &lt; document.styleSheets.length; s++) {
        for (var r = 0; r &lt; document.styleSheets[s][cssRules].length; r++) {
            if (document.styleSheets[s][cssRules][r].selectorText == '.' + className) {
                return document.styleSheets[s][cssRules][r];
            }
        }
    }
    return null;
}
getStyleClass('effect_appear').style.display = 'none';
</pre>
<p>Now, any element with that class will display normal to a user without JavaScript support,  but will be missing for users with JavaScript.  Next I added a &#8216;load&#8217; event handler to the window element, which will make the elements appear with an effect.</p>
<pre class="brush: jscript; title: ; notranslate">
Event.observe(window, 'load', effects);
function effects() {
    document.getElementsByClassName('effect_appear').each(
        function (el) {
            el.visualEffect('Appear');
        }
    );
}
</pre>
<p>However, there is still one problem.  Because the style we created is not inline, it seems to override any effect that we add.  The solution is to first remove the classname, and hide() the element (this will remove the class, but keep the element hidden, without the user ever seeing the element). Then we apply the visual effect (in this case, Appear).</p>
<pre class="brush: jscript; title: ; notranslate">
Event.observe(window, 'load', effects);
function effects() {
    document.getElementsByClassName('effect_appear').each(
        function (el) {
            el.removeClassName('effect_appear').hide().visualEffect('Appear');
        }
    );
}
</pre>
<p>Here is the whole thing.  Remember, the class  &#8220;effect_appear&#8221; MUST exist in one of your stylesheets, or in a style tag ABOVE this code.</p>
<pre class="brush: jscript; title: ; notranslate">
function getStyleClass (className) {
    if (document.styleSheets.length &lt; 1) {
        return null;
    }
    if (document.styleSheets[0].cssRules) {
        var cssRules = 'cssRules';
    } else {
        var cssRules = 'rules';
    }
    for (var s = 0; s &lt; document.styleSheets.length; s++) {
        for (var r = 0; r &lt; document.styleSheets[s][cssRules].length; r++) {
            if (document.styleSheets[s][cssRules][r].selectorText == '.' + className) {
                return document.styleSheets[s][cssRules][r];
            }
        }
    }
    return null;
}
getStyleClass('effect_appear').style.display = 'none';
Event.observe(window, 'load', effects);
function effects() {
    document.getElementsByClassName('effect_appear').each(
        function (el) {
            el.removeClassName('effect_appear').hide().visualEffect('Appear');
        }
    );
}
</pre>
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/' title='Using Prototype Javascript to set the value of a radio group'>Using Prototype Javascript to set the value of a radio group</a></li>
<li><a href='http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/' title='Using Prototype Javascript to get the value of a radio group'>Using Prototype Javascript to get the value of a radio group</a></li>
<li><a href='http://xavisys.com/google-maps-api/' title='Google Maps API'>Google Maps API</a></li>
<li><a href='http://xavisys.com/wordpress-script-handling/' title='Wordpress Script Handling'>WordPress Script Handling</a></li>
<li><a href='http://xavisys.com/writing-a-javascript-date-chooser/' title='My Javascript Date Chooser'>My Javascript Date Chooser</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>My Javascript Date Chooser</title>
		<link>http://xavisys.com/writing-a-javascript-date-chooser/</link>
		<comments>http://xavisys.com/writing-a-javascript-date-chooser/#comments</comments>
		<pubDate>Tue, 17 Oct 2006 22:41:12 +0000</pubDate>
		<dc:creator>Aaron D. Campbell</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://xavisys.com/writing-a-javascript-date-chooser/</guid>
		<description><![CDATA[If you just want the code, feel free to grab the files: Date Chooser JavaScript File Date Chooser CSS File Give it a try: All it takes to actually USE this, is to add onfocus=&#8221;cal.showCal(this);&#8221; to any text input like this: &#60;input name=&#8221;demo&#8221; type=&#8221;text&#8221; maxlength=&#8221;10&#8243; size=&#8221;10&#8243; onfocus=&#8221;cal.showCal(this);&#8221; /&#62; Related Posts: Google Maps API WordPress Script [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">@import "/wp-content/uploads/2006/12/calendar.css";</style>
<p><script src="/wp-content/uploads/2006/12/calendar.js" type="text/javascript"></script></p>
<p>If you just want the code, feel free to grab the files:</p>
<ul>
<li><a href='http://xavisys.com//wp-content/uploads/2006/12/calendar.js'>Date Chooser JavaScript File</a></li>
<li><a href='http://xavisys.com//wp-content/uploads/2006/12/calendar.css'>Date Chooser CSS File</a></li>
</ul>
<p>Give it a try:</p>
<input name="demo" maxlength="10" size="10" onfocus="cal.showCal(this);" style="width: auto" type="text" />
<p>All it takes to actually USE this, is to add onfocus=&#8221;cal.showCal(this);&#8221; to any text input like this:<br />
&lt;input name=&#8221;demo&#8221; type=&#8221;text&#8221; maxlength=&#8221;10&#8243; size=&#8221;10&#8243; <strong>onfocus=&#8221;cal.showCal(this);&#8221;</strong> /&gt;<br />
<h3 class='related_post_title'>Related Posts:</h3>
<ul class='related_post'>
<li><a href='http://xavisys.com/google-maps-api/' title='Google Maps API'>Google Maps API</a></li>
<li><a href='http://xavisys.com/wordpress-script-handling/' title='Wordpress Script Handling'>WordPress Script Handling</a></li>
<li><a href='http://xavisys.com/using-prototype-javascript-to-set-the-value-of-a-radio-group/' title='Using Prototype Javascript to set the value of a radio group'>Using Prototype Javascript to set the value of a radio group</a></li>
<li><a href='http://xavisys.com/using-prototype-javascript-to-get-the-value-of-a-radio-group/' title='Using Prototype Javascript to get the value of a radio group'>Using Prototype Javascript to get the value of a radio group</a></li>
<li><a href='http://xavisys.com/properly-degrading-js-effects-with-scriptaculous/' title='Properly degrading JavaScript Effects with Script.aculo.us'>Properly degrading JavaScript Effects with Script.aculo.us</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://xavisys.com/writing-a-javascript-date-chooser/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

