<?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>Owned By eL-CeWaD / Millikuvvetler.Net &#187; JavaScript</title>
	<atom:link href="http://thecssbug.com/category/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://thecssbug.com</link>
	<description>Owned By eL-CeWaD / Millikuvvetler.Net</description>
	<lastBuildDate>Wed, 28 Mar 2012 11:23:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>onChange Internet Explorer bug</title>
		<link>http://thecssbug.com/onchange-internet-explorer-bug</link>
		<comments>http://thecssbug.com/onchange-internet-explorer-bug#comments</comments>
		<pubDate>Wed, 22 Jul 2009 21:08:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[IE 6]]></category>
		<category><![CDATA[radio button group]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=115</guid>
		<description><![CDATA[Ever tried to use the onChange event to catch a change of state in a radio button group? The following code works alright in Firefox, but not in Internet Explorer:


&#60;input type=&#34;radio&#34; name=&#34;options&#34; id=&#34;option1&#34; onChange=&#34;alert(&#039;option1&#039;)&#34;&#62;
&#60;input type=&#34;radio&#34; name=&#34;options&#34; id=&#34;option2&#34; onChange=&#34;alert(&#039;option2&#039;)&#34;&#62;

IE treats the onChange event in a different manner: it recognizes something changed just after you lose focus [...]]]></description>
			<content:encoded><![CDATA[<p>Ever tried to use the onChange event to catch a change of state in a radio button group? The following code works alright in Firefox, but not in <strong>Internet Explorer</strong>:</p>
<pre class="brush: javascript">

&lt;input type=&quot;radio&quot; name=&quot;options&quot; id=&quot;option1&quot; onChange=&quot;alert(&#039;option1&#039;)&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;options&quot; id=&quot;option2&quot; onChange=&quot;alert(&#039;option2&#039;)&quot;&gt;
</pre>
<p>IE treats the onChange event in a different manner: it recognizes something changed just after you lose focus on that element. The solution for this problem is to use the <strong>onClick javascript event</strong> instead of <strong>onChange</strong>.</p>
<pre class="brush: javascript">

&lt;input type=&quot;radio&quot; name=&quot;options&quot; id=&quot;option1&quot; onClick=&quot;alert(&#039;option1&#039;)&quot;&gt;
&lt;input type=&quot;radio&quot; name=&quot;options&quot; id=&quot;option2&quot; onClick=&quot;alert(&#039;option2&#039;)&quot;&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/onchange-internet-explorer-bug/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 Today</title>
		<link>http://thecssbug.com/html-5-today</link>
		<comments>http://thecssbug.com/html-5-today#comments</comments>
		<pubDate>Mon, 06 Jul 2009 20:24:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[html 5]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=99</guid>
		<description><![CDATA[New features in HTML 5 are here]]></description>
			<content:encoded><![CDATA[<h5>New Features for Web App Developers</h5>
<p>With HTML 5’s emphasis on web application development, there’s plenty of new features for developers to use, some of which we can use today:</p>
<ul>
<li>A 2D drawing API for scripting graphics using the new <code>canvas</code> element, which is supported in all the major browsers except for Internet Explorer.</li>
<li><code>registerProtocolHandler</code> and <code>registerContentHandler</code>, which allow web applications to register for certain protocols or MIME types. Both are available in Firefox.</li>
<li>A manifest caching mechanism to support offline web applications, available in Firefox and Safari.</li>
<li>Video and audio APIs. The majority of the API works in Firefox, Opera (experimental build), and Safari—although Safari only uses Apple’s proprietary .mov format, rather than the open-source Ogg formats supported by Firefox and Opera.</li>
<li><code>window.postMessage</code>: cross-document messaging implemented in all major browsers.</li>
<li><code>history.pushState</code> to enable better back-button support in Ajax apps. (No implementations yet, but <code>window.onhashchange</code> is supported in IE8.)</li>
<li>A drag and drop API with a <code>draggable</code> attribute, supported in Firefox 3.5.</li>
<li>An editing API that hooks into the <code>contenteditable</code> attribute allowed on any element, already in all major browsers.</li>
<li>Client-side persistent storage using key/value pairs and support for embedded SQL databases: key/value pairs are in Firefox, Safari, and IE8, while SQL is supported only in Safari at this point.</li>
</ul>
<p><a href="http://www.sitepoint.com/article/html-5-snapshot-2009/">For more read the full SitePoint article</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/html-5-today/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript lose focus</title>
		<link>http://thecssbug.com/javascript-lose-focus</link>
		<comments>http://thecssbug.com/javascript-lose-focus#comments</comments>
		<pubDate>Fri, 03 Jul 2009 11:19:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Html]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[onBlur]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=97</guid>
		<description><![CDATA[How to validate a textfield using the javascript on lose focus event]]></description>
			<content:encoded><![CDATA[<p>When making fancy web 2.0<strong> javascript form validations</strong>, sometimes you may want to validate a html textfield right after the data was entered. What you need is to cacth the &#8216;<em>textfield lose focus&#8217; event</em>&#8216;, that is when a user enters some data into the textfield and then either clicks outside the field or &#8216;tabs&#8217; to the next field.</p>
<p>The JavaScript lose focus event is actually called <strong>onBlur</strong>, and is suppoerted by the following HTML tags:</p>
<pre class="brush: html">

&lt;a&gt;, &lt;acronym&gt;, &lt;address&gt;, &lt;area&gt;, &lt;b&gt;, &lt;bdo&gt;, &lt;big&gt;, &lt;blockquote&gt;,
&lt;button&gt;, &lt;caption&gt;, &lt;cite&gt;, &lt;dd&gt;, &lt;del&gt;, &lt;dfn&gt;, &lt;div&gt;, &lt;dl&gt;,
&lt;dt&gt;, &lt;em&gt;, &lt;fieldset&gt;, &lt;form&gt;, &lt;frame&gt;, &lt;frameset&gt;, &lt;h1&gt; to &lt;h6&gt;,
&lt;hr&gt;, &lt;i&gt;, &lt;iframe&gt;, &lt;img&gt;, &lt;input&gt;, &lt;ins&gt;, &lt;kbd&gt;, &lt;label&gt;,
&lt;legend&gt;, &lt;li&gt;, &lt;object&gt;, &lt;ol&gt;, &lt;p&gt;, &lt;pre&gt;, &lt;q&gt;, &lt;samp&gt;,
&lt;select&gt;, &lt;small&gt;, &lt;span&gt;, &lt;strong&gt;, &lt;sub&gt;, &lt;sup&gt;, &lt;table&gt;, &lt;tbody&gt;,
&lt;td&gt;, &lt;textarea&gt;, &lt;tfoot&gt;, &lt;th&gt;, &lt;thead&gt;, &lt;tr&gt;, &lt;tt&gt;, &lt;ul&gt;, &lt;var&gt;
</pre>
<p>and the following JavaScript objects:</p>
<pre class="brush: javascript">

button, checkbox, fileUpload, layer, frame, password, radio, reset, submit,
text, textarea, window
</pre>
<p>Usage example:</p>
<pre class="brush: html">

&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function upperCase()
{
var x=document.getElementById(&quot;fname&quot;).value;
document.getElementById(&quot;fname&quot;).value=x.toUpperCase();
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

Enter your name:
&lt;input type=&quot;text&quot; id=&quot;fname&quot; onblur=&quot;upperCase()&quot;&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/javascript-lose-focus/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SyntaxHighlighter Plus problem</title>
		<link>http://thecssbug.com/syntaxhighlighter-plus-problem</link>
		<comments>http://thecssbug.com/syntaxhighlighter-plus-problem#comments</comments>
		<pubDate>Mon, 06 Apr 2009 21:03:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[header.php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ProBlogger]]></category>
		<category><![CDATA[SyntaxHighlighter Plus]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=67</guid>
		<description><![CDATA[As I  started to build this blog, I clearly needed some solution for displaying code on a wordpress blog.
Asfter studying a few solutions with more or less results, I decided uppon SyntaxHighlighter Plus which seams to be the best solution out there.
However, although it worked great with the default Wordpress theme I realised that as [...]]]></description>
			<content:encoded><![CDATA[<p>As I  started to build this blog, I clearly needed some solution for displaying code on a wordpress blog.</p>
<p>Asfter studying a few solutions with more or less results, I decided uppon SyntaxHighlighter Plus which seams to be the best solution out there.</p>
<p>However, although it worked great with the default Wordpress theme I realised that as soon as I applied the &#8220;ProBlogger&#8221; theme, the javascripts that do the highlighting work would not function corectllyany more. The documentation did offer some solutions, but not the one I needed.</p>
<p>So, if you run into problems when installing SyntaxHighlighter Plus on some wordpress theme, be sure that the <em>header.php</em> file in your theme, contains the following line, somewhere in the head portion of the file:</p>
<pre class="brush: php">
&lt;?php wp_head(); ?&gt;
&lt;/head&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/syntaxhighlighter-plus-problem/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prototype Ajax PHP application (simple)</title>
		<link>http://thecssbug.com/prototype-ajax-php-application-simple</link>
		<comments>http://thecssbug.com/prototype-ajax-php-application-simple#comments</comments>
		<pubDate>Thu, 02 Apr 2009 09:13:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=3</guid>
		<description><![CDATA[Ajax for newbies: verify if record exists in database table using prototype and PHP.
Step 1: include prototype.js
Create a new page (index.php). Add this line of code in the  tag of index.php to include prototype framework:

&#60;script type=&#34;text/javascript&#34; src=&#34;prototype.js&#34;&#62;
&#60;/script&#62;

Step 2: HTML code for index.php


&#60;input type=&#34;text&#34; name=&#34;name&#34; id=&#34;name&#34; /&#62;
&#60;input type=&#34;submit&#34;  value=&#34;Verify&#34; onclick=&#34;javascript:verifyName()&#34;/&#62;

&#60;span id=&#34;result&#34; style=&#34;color:#009900&#34;&#62; &#60;/span&#62;

Step 3:Create  [...]]]></description>
			<content:encoded><![CDATA[<p>Ajax for newbies: verify if record exists in database table using prototype and PHP.</p>
<h2>Step 1: include prototype.js</h2>
<p>Create a new page (index.php). Add this line of code in the  tag of index.php to include prototype framework:</p>
<pre class="brush: js">
&lt;script type=&quot;text/javascript&quot; src=&quot;prototype.js&quot;&gt;
&lt;/script&gt;
</pre>
<h2><strong>Step 2: HTML code for index.php</strong></h2>
<pre class="brush: xhtml">

&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; /&gt;
&lt;input type=&quot;submit&quot;  value=&quot;Verify&quot; onclick=&quot;javascript:verifyName()&quot;/&gt;

&lt;span id=&quot;result&quot; style=&quot;color:#009900&quot;&gt; &lt;/span&gt;
</pre>
<h2>Step 3:Create  insert.php</h2>
<p>Create a new page (verify.php). This page contains a simple query to verify if  record  exists in database table (Users):</p>
<pre class="brush: php">
&lt;?php
if(isset($_GET[&#039;name&#039;]))
{
/* Connection to Database */
include(&#039;config.php&#039;);
/* Remove HTML tag to prevent query injection */
$name = strip_tags($_GET[&#039;name&#039;]);

$sql    =    &#039;SELECT *
FROM Users
WHERE user_name=&quot;&#039;.$name.&#039;&quot;&#039;;
$result=mysql_query($sql);
if(mysql_num_rows($result)&amp;amp;gt;0)
echo $name.&#039;the username already exists!&#039;;
else
echo $name.&#039;the username does not exist!&#039;;
}
else
{
echo &#039;0&#039;;
}
?&gt;
</pre>
<h2>Step 4: Javascript function to enable Ajax Request</h2>
<p>This code enable ajax request with prototype. Add this lines of code in the index.php file:</p>
<pre class="brush: js">

&lt;script type=&quot;text/javascript&quot;&gt;

function verifyName()
{
var name = $F(&#039;name&#039;);
var url = &#039;verify.php?&#039;;
var pars = &#039;name=&#039; + name;
new Ajax.Request(url, {method: &#039;get&#039;,parameters: pars,onComplete: showResponse});
}

function showResponse(originalRequest)
{
$(&#039;result&#039;).innerHTML = originalRequest.responseText;
}

&lt;/script&gt;
</pre>
<p>We pass the value we want to search for to index.php  using this simple code:</p>
<pre class="brush: js">
method: &#039;get&#039;,parameters: pars
</pre>
<p>onComplete we show in the <span> tag the response text, returned by the Ajax Request method:</span></p>
<pre class="brush: php">
if(mysql_num_rows($result)&amp;amp;amp;gt;0)
echo $name.&#039;the username already exists!&#039;;
else
echo $name.&#039;the username does not exist!&#039;;
</pre>
<p>The echo function returns the response text which is displayed in the &#8220;result&#8221; container in index.php, without ever leaving the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/prototype-ajax-php-application-simple/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

