<?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>Raphael Leray &#187; Coding</title>
	<atom:link href="http://raphaelleray.com/?feed=rss2&#038;cat=24" rel="self" type="application/rss+xml" />
	<link>http://raphaelleray.com</link>
	<description>Diary, artworks and codes</description>
	<lastBuildDate>Tue, 13 Apr 2010 09:13:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Récupérer vos variables GET en javascript</title>
		<link>http://raphaelleray.com/?p=300</link>
		<comments>http://raphaelleray.com/?p=300#comments</comments>
		<pubDate>Mon, 20 Jul 2009 13:47:08 +0000</pubDate>
		<dc:creator>Raphael Leray</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://raphaelleray.com/?p=300</guid>
		<description><![CDATA[Une fonction bien pratique qui permet de récupérer les variables GET en javascript : 

 function getVar(name)
         {
         get_string = document.location.search;
         return_value = '';

        [...]]]></description>
			<content:encoded><![CDATA[<p>Une fonction bien pratique qui permet de récupérer les variables GET en javascript : </p>
<pre name="code" class="js">
 function getVar(name)
         {
         get_string = document.location.search;
         return_value = '';

         do { //cette boucle va capturer toutes les instances des variables GET.
            name_index = get_string.indexOf(name + '=');

            if(name_index != -1)
              {
              get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index);

              end_of_value = get_string.indexOf('&#038;');
              if(end_of_value != -1)
                value = get_string.substr(0, end_of_value);
              else
                value = get_string;                

              if(return_value == '' || value == '')
                 return_value += value;
              else
                 return_value += ', ' + value;
              }
            } while(name_index != -1)

         space = return_value.indexOf('+');
         while(space != -1)
              {
              return_value = return_value.substr(0, space) + ' ' +
              return_value.substr(space + 1, return_value.length);

              space = return_value.indexOf('+');
              }

         return(return_value);
         }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://raphaelleray.com/?feed=rss2&amp;p=300</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
