<?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>ItHowTo.ro &#187; javascript website preloader</title>
	<atom:link href="http://www.ithowto.ro/tag/javascript-website-preloader/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ithowto.ro</link>
	<description>Blogging about IT Stuff by ESSERIO</description>
	<lastBuildDate>Wed, 30 Nov 2011 09:13:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Javascript Website Preloader</title>
		<link>http://www.ithowto.ro/2008/12/javascript-website-preloader/</link>
		<comments>http://www.ithowto.ro/2008/12/javascript-website-preloader/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 08:43:36 +0000</pubDate>
		<dc:creator>gkoo</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[javascript website preloader]]></category>

		<guid isPermaLink="false">http://www.ithowto.ro/?p=16</guid>
		<description><![CDATA[Here&#8217;s a nice java based website preloader I found recently. I needed it for a project and I think this might be useful to others too. Credits for this go to USINGIT.COM. So here&#8217;s how you should use it : Copy the following lines in to the header of the webpage: &#60;SCRIPT LANGUAGE=&#8221;JavaScript&#8221;&#62; &#60;!&#8211; Begin [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice java based website preloader I found recently. I needed it for a project and I think this might be useful to others too. Credits for this go to USINGIT.COM.</p>
<p>So here&#8217;s how you should use it :</p>
<p>Copy the following lines in to the header of the webpage:</p>
<p><strong>&lt;SCRIPT LANGUAGE=&#8221;JavaScript&#8221;&gt;</strong></p>
<p><strong>&lt;!&#8211; Begin<br />
function clearPreloadPage() { //DOM<br />
if (document.getElementById){<br />
document.getElementById(&#8216;prepage&#8217;).style.visibility=&#8217;hidden&#8217;;<br />
}else{<br />
if (document.layers){ //NS4<br />
document.prepage.visibility = &#8216;hidden&#8217;;<br />
}<br />
else { //IE4<br />
document.all.prepage.style.visibility = &#8216;hidden&#8217;;<br />
}<br />
}<br />
}<br />
// End &#8211;&gt;<br />
&lt;/SCRIPT&gt;</strong></p>
<p>Now add this to you body tag:</p>
<p><strong>&lt;BODY onLoad=&#8221;clearPreloadPage();&#8221;&gt;</strong></p>
<p>Then, in the body of the actual website, add the following that will display a loading message until the content of yout page is fully loaded.</p>
<p><strong> &lt;div id=&#8221;prepage&#8221; style=&#8221;position:absolute; font-family:arial; font-size:16; left:0px;top:0px; background-image:url(images/mainBg.gif); background-repeat:repeat; height:100%; width:100%;&#8221;&gt;<br />
&lt;div style=&#8221;padding-top:350px; text-align:center;&#8221;&gt;&lt;img src=&#8221;images/loading.gif&#8221; height=&#8221;20&#8243; width=&#8221;20&#8243; /&gt;&lt;span style=&#8221;font-size:19px; color:#000000; height:&#8221;&gt; Se Incarca&#8230;&lt;/span&gt;&lt;/div&gt;</strong></p>
<p>You can customise the first div and add your own background or whatever you want but keep its <strong>id = &#8220;prepage&#8221;</strong> and the <strong>position:absolute;</strong> <strong>left:0px;top:0px;</strong> elements in its style. Then, in the second div, place whatever text or animated gif you&#8217;d like to be displayed until the page is loaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ithowto.ro/2008/12/javascript-website-preloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

