<?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>SKYCUBE.net &#187; ajax</title>
	<atom:link href="http://skycube.net/tag/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://skycube.net</link>
	<description>Projects, References and Personals by Per Lasse Baasch</description>
	<lastBuildDate>Fri, 29 Jul 2011 01:21:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Style up your JavaScript confirm boxes</title>
		<link>http://skycube.net/2009/04/26/style-up-your-javascript-confirm-boxes/</link>
		<comments>http://skycube.net/2009/04/26/style-up-your-javascript-confirm-boxes/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 22:13:21 +0000</pubDate>
		<dc:creator>Per Lasse Baasch</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://www.skycube.net/?p=55</guid>
		<description><![CDATA[When you start up or just join a project based on webapplications, the design of interface is maybe good. Otherwise this should be changed. In order to Web 2.0 applications you will work with dynamic contents, many effects and other stuff. All these things are fine, but no one thought about to style up the [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0in;">When you start up or just join a project based on webapplications, the design of interface is maybe good. Otherwise this should be changed. In order to Web 2.0 applications you will work with dynamic contents, many effects and other stuff. All these things are fine, but no one thought about to style up the JavaScript alert and confirm boxes.</p>
<p style="margin-bottom: 0in;">Here is the they way,.. completely dynamic, JS and CSS driven&#8230;</p>
<p style="margin-bottom: 0in;"><img class="aligncenter size-full wp-image-67" title="screenshot-jsconfirmsyle" src="http://www.skycube.net/wp-content/uploads/2009/04/screenshot-jsconfirmsyle.png" alt="screenshot-jsconfirmsyle" width="592" height="276" /></p>
<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">The HTML &amp; CSS code:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#jsconfirm</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#c0c0c0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">4px</span> <span style="color: #933;">4px</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-1000px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">100</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#jsconfirm</span> table <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #993333;">groove</span> <span style="color: #cc00cc;">#c0c0c0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">150px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#jsconfirmtitle</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#B0B0B0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#jsconfirmbuttons</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#jsconfirmbuttons</span> input <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#E9E9CF</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">125px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">33px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#jsconfirmleft</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">left.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#jsconfirmright</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">right.png</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
--&amp;gt<span style="color: #00AA00;">;</span>
&nbsp;
&lt;a onclick<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;javascript:showConfirm('Please confirm','Are you really really sure to visit google?','Yes','http://www.google.com','No','#')&quot;</span> href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;#&quot;</span><span style="color: #00AA00;">&gt;</span>JsConfirmStyled&lt;/a<span style="color: #00AA00;">&gt;</span></pre></div></div>

<p style="margin-bottom: 0in;">
<p style="margin-bottom: 0in;">The JS Code:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">//Check for ie5+ and nn6</span>
&nbsp;
ie5<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>document.<span style="color: #660066;">all</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span>document.<span style="color: #660066;">styleSheets</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">?</span><span style="color: #CC0000;">1</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
nn6<span style="color: #339933;">=</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;!</span>document.<span style="color: #660066;">all</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">?</span><span style="color: #CC0000;">1</span><span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
xConfirmStart<span style="color: #339933;">=</span><span style="color: #CC0000;">800</span><span style="color: #339933;">;</span>
&nbsp;
yConfirmStart<span style="color: #339933;">=</span><span style="color: #CC0000;">100</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>ie5<span style="color: #339933;">||</span>nn6<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>ie5<span style="color: #009900;">&#41;</span> cs<span style="color: #339933;">=</span><span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>th<span style="color: #339933;">=</span><span style="color: #CC0000;">30</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">else</span> cs<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>th<span style="color: #339933;">=</span><span style="color: #CC0000;">20</span><span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>
&nbsp;
		<span style="color: #3366CC;">&quot;
&lt;div id=&quot;</span>jsconfirm<span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #339933;">+</span>
&nbsp;
			<span style="color: #3366CC;">&quot;
&lt;table border=&quot;</span><span style="color: #CC0000;">0</span><span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #339933;">+</span>
&nbsp;
				<span style="color: #3366CC;">&quot;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td id=&quot;</span>jsconfirmtitle<span style="color: #3366CC;">&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&quot;</span><span style="color: #339933;">+</span>
&nbsp;
				<span style="color: #3366CC;">&quot;
&lt;tr&gt;
&lt;td id=&quot;</span>jsconfirmcontent<span style="color: #3366CC;">&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&quot;</span><span style="color: #339933;">+</span>
&nbsp;
				<span style="color: #3366CC;">&quot;
&lt;tr&gt;
&lt;td id=&quot;</span>jsconfirmbuttons<span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #339933;">+</span>
&nbsp;
					<span style="color: #3366CC;">&quot;
&lt;input id=&quot;</span>jsconfirmleft<span style="color: #3366CC;">&quot; onclick=&quot;</span>leftJsConfirm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #3366CC;">&quot; type=&quot;</span>button<span style="color: #3366CC;">&quot; /&gt;&quot;</span><span style="color: #339933;">+</span>
&nbsp;
					<span style="color: #3366CC;">&quot;  &quot;</span><span style="color: #339933;">+</span>
&nbsp;
					<span style="color: #3366CC;">&quot;
&lt;input id=&quot;</span>jsconfirmright<span style="color: #3366CC;">&quot; onclick=&quot;</span>rightJsConfirm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #3366CC;">&quot; type=&quot;</span>button<span style="color: #3366CC;">&quot; /&gt;&quot;</span><span style="color: #339933;">+</span>
&nbsp;
				<span style="color: #3366CC;">&quot;&lt;/td&gt;
&lt;/tr&gt;
&quot;</span><span style="color: #339933;">+</span>
&nbsp;
			<span style="color: #3366CC;">&quot;&lt;/tbody&gt;&lt;/table&gt;
&quot;</span><span style="color: #339933;">+</span>
&nbsp;
		<span style="color: #3366CC;">&quot;&lt;/div&gt;
&quot;</span>
&nbsp;
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> leftJsConfirm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'jsconfirm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">top</span><span style="color: #339933;">=-</span><span style="color: #CC0000;">1000</span><span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">=</span>leftJsConfirmUri<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> rightJsConfirm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'jsconfirm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">top</span><span style="color: #339933;">=-</span><span style="color: #CC0000;">1000</span><span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">=</span>rightJsConfirmUri<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> confirmAlternative<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">confirm</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Scipt requieres a better browser!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.mozilla.org&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
leftJsConfirmUri <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
&nbsp;
rightJsConfirmUri <span style="color: #339933;">=</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/**
&nbsp;
 * Show the message/confirm box
&nbsp;
 */</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> showConfirm<span style="color: #009900;">&#40;</span>confirmtitle<span style="color: #339933;">,</span>confirmcontent<span style="color: #339933;">,</span>confirmlefttext<span style="color: #339933;">,</span>confirmlefturi<span style="color: #339933;">,</span>confirmrighttext<span style="color: #339933;">,</span>confirmrighturi<span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirmtitle&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span>confirmtitle<span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirmcontent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span><span style="color: #339933;">=</span>confirmcontent<span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirmleft&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">=</span>confirmlefttext<span style="color: #339933;">;</span>
&nbsp;
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirmright&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">=</span>confirmrighttext<span style="color: #339933;">;</span>
&nbsp;
	leftJsConfirmUri<span style="color: #339933;">=</span>confirmlefturi<span style="color: #339933;">;</span>
&nbsp;
	rightJsConfirmUri<span style="color: #339933;">=</span>confirmrighturi<span style="color: #339933;">;</span>
&nbsp;
	xConfirm<span style="color: #339933;">=</span>xConfirmStart<span style="color: #339933;">,</span> yConfirm<span style="color: #339933;">=</span>yConfirmStart<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>ie5<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">left</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'25%'</span><span style="color: #339933;">;</span>
&nbsp;
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">top</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'35%'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>nn6<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">top</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'25%'</span><span style="color: #339933;">;</span>
&nbsp;
		document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;jsconfirm&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">left</span><span style="color: #339933;">=</span><span style="color: #3366CC;">'35%'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000066; font-weight: bold;">else</span> confirmAlternative<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p style="margin-bottom: 0in;">You can dowload all scripts: Note: There is a file embedded within this post, please visit this post to download the file.</p>
]]></content:encoded>
			<wfw:commentRss>http://skycube.net/2009/04/26/style-up-your-javascript-confirm-boxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session problems</title>
		<link>http://skycube.net/2009/02/21/session-problems/</link>
		<comments>http://skycube.net/2009/02/21/session-problems/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 01:20:54 +0000</pubDate>
		<dc:creator>Per Lasse Baasch</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.skycube.net/?p=40</guid>
		<description><![CDATA[While you working with web applications it could happen that you get several errors.. Never underestimate real server problems. When you try to start a new Web 2.0 application or just the usage and/or visits of your application increase, maybe non-linear, you can login to your application but you can&#8217;t proceed. On enterprise applications it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>While you working with web applications it could happen that you get several errors.. Never underestimate real server problems. When you try to start a new <strong>Web 2.0</strong> application or just the usage and/or visits of your application increase, maybe non-linear, you can login to your application but you can&#8217;t proceed.</p>
<p>On enterprise applications it&#8217;s recommended to set <strong><em>php display errors to off</em></strong>, so won&#8217;t see what really happened.</p>
<p>While tracking the problem to your browser and the customers and may the service provider, you should just login with a shell.<br />
First thing you should do is, like all time, who and last. After that, may you try to find out what happen in the apache access and error log. You will find nothing, cause there is nothing critical, nothing new. May you see the session file in your filesystem, but why is it empty? A php bug?</p>
<p>Why? Ok just the answer, try this: <strong><em>df -h</em></strong> , you will see the a 100% full partition <img src='http://skycube.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   and when you try a <strong><em>du -shm /var/log/*</em></strong> you see your problem&#8230; GB&#8217;s of apache logs&#8230;</p>
<p>What happened? Your Web 2.0 application uses <strong>polling</strong>, and your apache got a custom, combined log which writes to access.log.</p>
<ul>
<li> Solution 1: Drop the line in your apache virtualhost configuration for custom, combined log</li>
</ul>
<ul>
<li> Solution 2: Proceed a massive logrotation</li>
</ul>
<ul>
<li> Solution 3: Pipe the combined  log to a perl or php-cli script which filters the polling events (I prefer)</li>
</ul>
<p>On local, staging and or development installations you should switch the display errors for php to on,&#8230; then you get messages like this:<br />
<code><br />
WARNING: session_write_close() [function.session-write-close]...<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://skycube.net/2009/02/21/session-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZMG-Project finally closed!</title>
		<link>http://skycube.net/2008/10/26/zmg-project-finally-closed/</link>
		<comments>http://skycube.net/2008/10/26/zmg-project-finally-closed/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 15:00:55 +0000</pubDate>
		<dc:creator>Per Lasse Baasch</dc:creator>
				<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Jommla!]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.skycube.net/?p=11</guid>
		<description><![CDATA[Dear community, the ZMG-Project is finally closed! After long discussions, many ideas and hundreds of emails, we decided there is no way back&#8230; We can&#8217;t spend the time any longer and we have no youthful enthusiasm anymore to reanimate and produce a new stable version of ZMG for Joomla! 1.5. May the force be with [...]]]></description>
			<content:encoded><![CDATA[<p>Dear community,</p>
<p>the ZMG-Project is finally closed!</p>
<p>After long discussions, many ideas and hundreds of emails, we decided there is no way  back&#8230; We can&#8217;t spend the time any longer and we have no youthful enthusiasm anymore to  reanimate and produce a new stable version of ZMG for Joomla! 1.5.</p>
<p>May the force be with us <img src='http://skycube.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Per Lasse Baasch for the ZMG-Team</p>
]]></content:encoded>
			<wfw:commentRss>http://skycube.net/2008/10/26/zmg-project-finally-closed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

