<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.2" -->
<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/"
	>

<channel>
	<title>Phil's Brain Stew</title>
	<link>http://blog.visionalechoes.com</link>
	<description>Visional Echoes blog about all things web</description>
	<pubDate>Fri, 02 Nov 2007 22:22:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>
	<language>en</language>
			<item>
		<title>CSS liberation. And other fun stuff.</title>
		<link>http://blog.visionalechoes.com/2007/07/22/rants/css-liberation-and-other-fun-stuff/</link>
		<comments>http://blog.visionalechoes.com/2007/07/22/rants/css-liberation-and-other-fun-stuff/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 02:40:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://blog.visionalechoes.com/2007/07/22/rants/css-liberation-and-other-fun-stuff/</guid>
		<description><![CDATA[Alright, I read something tonight that I have to share. It was written years ago, but it still applies, and I love it.
This article by Dave Shea really hits the CSS Compliance Police or CCP right where it hurts. (Yes, thats a term I made up)
It talks about&#8230; using&#8230; tables&#8230; for&#8230; presentation. I can already [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, I read something tonight that I have to share. It was written years ago, but it still applies, and I love it.</p>
<p><a href="http://www.mezzoblue.com/archives/2004/05/15/tables_oh_th/">This article</a> by <a href="http://www.mezzoblue.com">Dave Shea</a> really hits the CSS Compliance Police or <abbr title="CSS Compliance Police">CCP</abbr> right where it hurts. (Yes, thats a term I made up)</p>
<p>It talks about&#8230; using&#8230; tables&#8230; for&#8230; presentation. I can already hear the police sirens. But seriously, read it&#8230; embrace it&#8230; and make it your own.</p>
<p>And to compound your pleasure, Dave Shea refers to an <a href="http://blog.fawny.org/2004/05/16/ubu/">article</a> by the accessibility maestro, <a href="http://joeclark.org/">Joe Clark</a> himself, that when I read it, gave me the same butterflies in my stomach that I got while watching Maverick and Goose dogfighting against enemy <acronym title="Mikoyan &#038; Gurevich">MiGS</acronym>.</p>
<p>Enjoy.</p>
<p>Oh, and by the way. If you disagree with my enthusiasm over these articles, keep it to yourself. Thank you.</p>
<p>Phil Dodson</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.visionalechoes.com/2007/07/22/rants/css-liberation-and-other-fun-stuff/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Query String Value Getter Function</title>
		<link>http://blog.visionalechoes.com/2007/07/07/javascript/query-string-value-getter/</link>
		<comments>http://blog.visionalechoes.com/2007/07/07/javascript/query-string-value-getter/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 02:08:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.visionalechoes.com/2007/07/07/javascript-stuff/query-string-value-getter/</guid>
		<description><![CDATA[This function will take a query string (or use the current URI if no string is supplied) and return the value of the chosen argument.
Code

function GetQueryValue&#40;k,q&#41; // Key, Query String
&#123;
   q=q&#124;&#124;location.href;  // uses current uri if no query is supplied
   var tmpNdx=q.indexOf&#40;'?'&#41;;
   if &#40;tmpNdx!=-1&#41; // If string has [...]]]></description>
			<content:encoded><![CDATA[<p>This function will take a query string (or use the current URI if no string is supplied) and return the value of the chosen argument.</p>
<h2>Code</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript"><span style="color: #003366; font-weight: bold;">function</span> GetQueryValue<span style="color: #66cc66;">&#40;</span>k,q<span style="color: #66cc66;">&#41;</span> <span style="color: #009900; font-style: italic;">// Key, Query String</span>
<span style="color: #66cc66;">&#123;</span>
   q=q||location.<span style="color: #006600;">href</span>;  <span style="color: #009900; font-style: italic;">// uses current uri if no query is supplied</span>
   <span style="color: #003366; font-weight: bold;">var</span> tmpNdx=q.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'?'</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>tmpNdx!=<span style="color: #CC0000;">-1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #009900; font-style: italic;">// If string has query information</span>
   <span style="color: #66cc66;">&#123;</span>
      q=q.<span style="color: #006600;">slice</span><span style="color: #66cc66;">&#40;</span>tmpNdx<span style="color: #CC0000;">+1</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #009900; font-style: italic;">// Remove all information except for query</span>
      q=q.<span style="color: #006600;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'&amp;'</span><span style="color: #66cc66;">&#41;</span>;      <span style="color: #009900; font-style: italic;">// Create array of key/value pairs</span>
      <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i=<span style="color: #CC0000;">0</span>;i&lt;q.<span style="color: #006600;">length</span>;i++<span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#123;</span>
         <span style="color: #003366; font-weight: bold;">var</span> p=q<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">indexOf</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'='</span><span style="color: #66cc66;">&#41;</span>;
         <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>p&gt;<span style="color: #CC0000;">0</span><span style="color: #66cc66;">&#41;</span>
         <span style="color: #66cc66;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> thisk=q<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;">0</span>,p<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>thisk==k<span style="color: #66cc66;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> q<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">substring</span><span style="color: #66cc66;">&#40;</span>p<span style="color: #CC0000;">+1</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #009900; font-style: italic;">// return value</span>
         <span style="color: #66cc66;">&#125;</span>
      <span style="color: #66cc66;">&#125;</span>
      <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">null</span>; <span style="color: #009900; font-style: italic;">// If key doesn't exist, return null	</span>
   <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">null</span>; <span style="color: #009900; font-style: italic;">// If no query information, return null</span>
   <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h2>Returns</h2>
<ul>
<li><em>string</em> | value of argument if exists</li>
<li><em>null</em> if argument doesn&#8217;t exist</li>
</ul>
<h2>Prototype</h2>
<p>GetQueryValue(string <em>key</em>[, query string])</p>
<p><strong>Note</strong> that the query string argument is optional. If no string is supplied, script will use the address of the page.</p>
<h2>Samples</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript">&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span> src=<span style="color: #3366CC;">&quot;GetQueryValue.js&quot;</span>&gt;&lt;/script&gt;   <span style="color: #009900; font-style: italic;">// include the script</span>
&lt;script type=<span style="color: #3366CC;">&quot;text/javascript&quot;</span>&gt;
   <span style="color: #003366; font-weight: bold;">var</span> myStr=<span style="color: #3366CC;">'http://www.mywebsite.com?var1=foo&amp;var2=bar'</span>;
&nbsp;
   <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>GetQueryValue<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'var2'</span>,myStr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;     <span style="color: #009900; font-style: italic;">// alerts bar</span>
   <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>GetQueryValue<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'somevar'</span>,myStr<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;  <span style="color: #009900; font-style: italic;">// alerts null</span>
   <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>GetQueryValue<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'myvar'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;              <span style="color: #009900; font-style: italic;">//  Searches your current URI and returns myvar if it exists</span>
&lt;/script&gt;</pre></div></div>

<h2>Download</h2>
<p>You can download the script <a href="http://www.visionalechoes.com/resources/js/GetQueryValue.js">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.visionalechoes.com/2007/07/07/javascript/query-string-value-getter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>FormElement Classes</title>
		<link>http://blog.visionalechoes.com/2007/06/16/php/formelement-object/</link>
		<comments>http://blog.visionalechoes.com/2007/06/16/php/formelement-object/#comments</comments>
		<pubDate>Sun, 17 Jun 2007 02:57:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.visionalechoes.com/?p=3</guid>
		<description><![CDATA[What does it do, exactly?
This FormElement object makes creating sticky forms in PHP rather easy.
I was looking for an easy way to make sticky forms in PHP without using clunky code chunks in the value attributes of my form elements. I&#8217;m sure there are numerous solutions for this, but hey, lets face it, it&#8217;s fun [...]]]></description>
			<content:encoded><![CDATA[<h2>What does it do, exactly?</h2>
<p>This FormElement object makes creating sticky forms in PHP rather easy.</p>
<p>I was looking for an easy way to make sticky forms in PHP without using clunky code chunks in the value attributes of my form elements. I&#8217;m sure there are numerous solutions for this, but hey, lets face it, it&#8217;s fun to learn new things! And I saw this as a perfect way to get my feet wet in Object Oriented Programming.</p>
<p>So after some work, here we have some classes that do just what I wanted. They create HTML input elements inside of a form while making these elements sticky, in the event of a validation error (or any other reason to post back the form values) occurs.</p>
<p> <a href="http://blog.visionalechoes.com/2007/06/16/php/formelement-object/#more-3" class="more-link">(more&#8230;)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.visionalechoes.com/2007/06/16/php/formelement-object/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
