<?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>The Css Bug &#187; Prototype</title>
	<atom:link href="http://thecssbug.com/category/prototype/feed" rel="self" type="application/rss+xml" />
	<link>http://thecssbug.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 29 Jul 2009 15:52:02 +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>Background image on table rows repeating on columns IE bug</title>
		<link>http://thecssbug.com/background-image-on-table-rows-repeating-on-columns-ie-bug</link>
		<comments>http://thecssbug.com/background-image-on-table-rows-repeating-on-columns-ie-bug#comments</comments>
		<pubDate>Mon, 06 Apr 2009 13:55:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Html]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[background-image]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://thecssbug.com/?p=26</guid>
		<description><![CDATA[One of the oldest problems in webdesign is related to background images on table rows.
Problem: when you provide a background images (through HTML or CSS) on a table row:


&#60;table&#62;

&#60;tr background=&#34;bg.gif&#34;&#62;

&#60;td&#62;some stuff&#60;/td&#62;

&#60;td&#62;more stuff&#60;/td&#62;

&#60;tr&#62;

&#60;/table&#62;

On Firefox everything would go out as planned. However in older browsers like IE 6, each of the 2 table columns will inherit the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the oldest problems in webdesign is related to background images on table rows.</p>
<p>Problem: when you provide a background images (through HTML or CSS) on a table row:</p>
<pre class="brush: xhtml">

&lt;table&gt;

&lt;tr background=&quot;bg.gif&quot;&gt;

&lt;td&gt;some stuff&lt;/td&gt;

&lt;td&gt;more stuff&lt;/td&gt;

&lt;tr&gt;

&lt;/table&gt;
</pre>
<p>On Firefox everything would go out as planned. However in older browsers like IE 6, each of the 2 table columns will inherit the background image and you will get a nasty effect.</p>
<p>Solution: You will need to use <em>background-image:none </em>on every table cell while the row needs a position:relative.<em><br />
</em></p>
<pre class="brush: xhtml">

&lt;table&gt;

&lt;tr style=&quot;background-image: url(bg.gif);  position: relative;&quot;&gt;

&lt;td style=&quot;background-image:none;&quot;&gt;some stuff &lt;/td&gt;

&lt;td style=&quot;background-image:none;&quot;&gt; more stuff &lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://thecssbug.com/background-image-on-table-rows-repeating-on-columns-ie-bug/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>
