<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1041867" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1041867</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Client code can be changed</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233352</link>
    <description> &lt;p&gt;Client code can be changed by clients, server side can only be changed by hackers who would likely get into your server anyway, regardless.&lt;/p&gt;
&lt;p&gt;Which is why I have form validation done with PHP. Regardless of what, or how, they send data to the process page, the PHP ensures it is all acceptable data.&lt;/p&gt;
 </description>
     <pubDate>Thu, 11 Sep 2008 16:24:24 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1233352 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>IMO, if you have time to do</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233304</link>
    <description> &lt;p&gt;IMO, if you have time to do it, have both Client-Side and Server-Side&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Thu, 11 Sep 2008 02:03:01 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1233304 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Yeah, I am working on a site</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233302</link>
    <description> &lt;p&gt;Yeah, I am working on a site that has to be section 508 accessible, therefore NO JS - but for quick client stuff, usually I go with JS (keep the server reqs down)&lt;/p&gt;
 </description>
     <pubDate>Thu, 11 Sep 2008 01:46:13 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1233302 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Fantastic! Works like a ..</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233300</link>
    <description> &lt;p&gt;Fantastic! Works like a .. well, a bit of php code that works.&lt;/p&gt;
&lt;p&gt;Thanks Greg.&lt;/p&gt;
&lt;p&gt;(thanks debical too, your solution would have been great had I been able to use JS)&lt;/p&gt;
 </description>
     <pubDate>Wed, 10 Sep 2008 21:40:34 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1233300 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Try this:
if</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233296</link>
    <description> &lt;p&gt;Try this:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;if (preg_match(&amp;#039;/\s{2}/&amp;#039;,$_POST[&amp;#039;inputname&amp;#039;])) {&lt;br /&gt;&amp;nbsp; echo &amp;quot;There was muliple whitespaces together&amp;quot;;&lt;br /&gt;}&lt;br /&gt;else {&lt;br /&gt;&amp;nbsp; echo &amp;quot;You are good to go&amp;quot;;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;the \s tells it any whitespace character, the {2} tells it repeated twice.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Wed, 10 Sep 2008 19:23:03 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1233296 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks, but I was hoping for</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233291</link>
    <description> &lt;p&gt;Thanks, but I was hoping for a PHP method (I should have perhaps stated that).&lt;br /&gt;
I can&#039;t use JS for security checking as my form checking scripts don&#039;t issue any output to the users browser, just determine if all ok do else send back to form with error.&lt;/p&gt;
&lt;p&gt;Thanks anyway though&lt;/p&gt;
 </description>
     <pubDate>Wed, 10 Sep 2008 15:04:44 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1233291 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>wouldn&#039;t this work?
&lt;script</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/double-white-space#comment-1233211</link>
    <description> &lt;p&gt;wouldn&#039;t this work?&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;if(yourstring.indexOf(&amp;quot;&amp;nbsp; &amp;quot;) || (yourstring.substring(0,2) == &amp;quot;&amp;nbsp; &amp;quot;)){&lt;br /&gt;&amp;nbsp; alert(&amp;quot;you typed a doublespace!&amp;quot;);&lt;br /&gt;&amp;nbsp; getelementbyid(&amp;#039;formelementid&amp;#039;).focus();&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;the substring test is if the string starts with the doublespace...&lt;/p&gt;
&lt;p&gt;checked it:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;var str = &amp;quot;&amp;nbsp; Hello world!&amp;quot;;&lt;br /&gt;&lt;br /&gt;if (str.indexOf(&amp;quot;&amp;nbsp; &amp;quot;) || str.substr(0,2) == &amp;quot;&amp;nbsp; &amp;quot;) alert(&amp;#039;bingo&amp;#039;);&lt;br /&gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 08 Sep 2008 23:54:52 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1233211 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
