<?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>LAMPdocs: Linux, Apache, MySQL, PHP &#187; HTML and Javascript Tips</title>
	<atom:link href="http://www.lampdocs.com/blog/category/html-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lampdocs.com/blog</link>
	<description>Linux, Apache, MySQL, PHP: Docs, Tricks and Secrets</description>
	<lastBuildDate>Wed, 04 Jan 2012 13:11:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Open a Javascript Pop Up With Fixed Size</title>
		<link>http://www.lampdocs.com/blog/2008/12/how-to-open-a-javascript-pop-up-with-fixed-size/</link>
		<comments>http://www.lampdocs.com/blog/2008/12/how-to-open-a-javascript-pop-up-with-fixed-size/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 05:29:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML and Javascript Tips]]></category>
		<category><![CDATA[javascript open sized popup]]></category>
		<category><![CDATA[javascript open window]]></category>
		<category><![CDATA[javascript popup script]]></category>
		<category><![CDATA[open a browser in fixed size javascript]]></category>
		<category><![CDATA[opening fixed pop ups]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=454</guid>
		<description><![CDATA[Modern browsers in their default settings are blocking pop up windows. A simple window.open will not open a pop-up as most probably it will be blocked. But what to do if you need to show a special offer or something like this? I&#8217;d suggest you to open a window on user action, e.g. clicking a [...]]]></description>
			<content:encoded><![CDATA[<p>Modern browsers in their default settings are blocking pop up windows. A simple window.open will not open a pop-up as most probably it will be blocked. But what to do if you need to show a special offer or something like this?</p>
<p>I&#8217;d suggest you to open a window on user action, e.g. clicking a button or moving mouse. I&#8217;ve copied this script from the Internet and successfully using it to enable pop-ups on clicking the links.</p>
<blockquote><p>&lt;script type=&#8221;text/javascript&#8221; language=&#8221;javascript&#8221;&gt;<br />
&lt;!&#8211; //<br />
var popWin = null    // use this when referring to pop-up window<br />
var winCount = 0<br />
var winName = &#8220;popWin&#8221;<br />
function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){<br />
var d_winLeft = 20  // default, pixels from screen left to window left<br />
var d_winTop = 20   // default, pixels from screen top to window top<br />
winName = &#8220;popWin&#8221; + winCount++ //unique name for each pop-up window<br />
closePopWin()           // close any previously opened pop-up window<br />
if (openPopWin.arguments.length &gt;= 4)  // any additional features?<br />
winFeatures = &#8220;,&#8221; + winFeatures<br />
else<br />
winFeatures = &#8220;&#8221;<br />
if (openPopWin.arguments.length == 6)  // location specified<br />
winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)<br />
else<br />
winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)<br />
popWin = window.open(winURL, winName, &#8220;width=&#8221; + winWidth<br />
+ &#8220;,height=&#8221; + winHeight + winFeatures)<br />
}</p>
<p>function closePopWin(){    // close pop-up window if it is open<br />
if (navigator.appName != &#8220;Microsoft Internet Explorer&#8221;<br />
|| parseInt(navigator.appVersion) &gt;=4) //do not close if early IE<br />
if(popWin != null) if(!popWin.closed) popWin.close()<br />
}</p>
<p>function getLocation(winWidth, winHeight, winLeft, winTop){<br />
return &#8220;&#8221;<br />
}</p>
<p>function getLocation(winWidth, winHeight, winLeft, winTop){<br />
var winLocation = &#8220;&#8221;<br />
if (winLeft &lt; 0)<br />
winLeft = screen.width &#8211; winWidth + winLeft<br />
if (winTop &lt; 0)<br />
winTop = screen.height &#8211; winHeight + winTop<br />
if (winTop == &#8220;cen&#8221;)<br />
winTop = (screen.height &#8211; winHeight)/2 &#8211; 20<br />
if (winLeft == &#8220;cen&#8221;)<br />
winLeft = (screen.width &#8211; winWidth)/2<br />
if (winLeft&gt;0 &amp; winTop&gt;0)<br />
winLocation =  &#8220;,screenX=&#8221; + winLeft + &#8220;,left=&#8221; + winLeft<br />
+ &#8220;,screenY=&#8221; + winTop + &#8220;,top=&#8221; + winTop<br />
else<br />
winLocation = &#8220;&#8221;<br />
return winLocation<br />
}<br />
//&#8211;&gt;<br />
// &#8211;&gt;<br />
&lt;/script&gt;</p></blockquote>
<p>Script usage is the following:</p>
<blockquote><p>onClick=&#8221;javascript:openPopWin(&#8216;Your URL&#8217;,Width,height,&#8221;,pixels from screen left to window left,pixels from screen top to window top)&#8221;</p></blockquote>
<p>This will allow you to open a window and it is not blocked with browsers. If you have a more elegant solution, you&#8217;re welcome to post it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/12/how-to-open-a-javascript-pop-up-with-fixed-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Reload a Page Only Once Using Javascript</title>
		<link>http://www.lampdocs.com/blog/2008/07/how-to-reload-a-page-only-once-using-javascript/</link>
		<comments>http://www.lampdocs.com/blog/2008/07/how-to-reload-a-page-only-once-using-javascript/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 12:07:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML and Javascript Tips]]></category>
		<category><![CDATA[code to reload the page using javascript]]></category>
		<category><![CDATA[javascript reload once]]></category>
		<category><![CDATA[javascript reload only once]]></category>
		<category><![CDATA[javascript reload page once]]></category>
		<category><![CDATA[reload a page once]]></category>
		<category><![CDATA[reload once on opening]]></category>
		<category><![CDATA[reload page once script]]></category>
		<category><![CDATA[reload page only once html]]></category>
		<category><![CDATA[reload page only once script]]></category>
		<category><![CDATA[reload using javascript]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=102</guid>
		<description><![CDATA[Here is a small piece of code that allows to reload a page only once. This is necessary to prevent some data being cached and this is the only solution I found good for my needs. Meta tag nocache did not save me, and meta tag refresh does not allow to refresh the page only [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a small piece of code that allows to reload a page only once. This is necessary to prevent some data being cached and this is the only solution I found good for my needs. Meta tag nocache did not save me, and meta tag refresh does not allow to refresh the page only once.  So here is the code:</p>
<blockquote><p><strong>&lt;script&gt;<br />
var reloaded = false;<br />
var loc=&#8221;"+document.location;<br />
loc = loc.indexOf(&#8220;?reloaded=&#8221;)!=-1?loc.substring(loc.indexOf(&#8220;?reloaded=&#8221;)+10,loc.length):&#8221;";<br />
loc = loc.indexOf(&#8220;&amp;&#8221;)!=-1?loc.substring(0,loc.indexOf(&#8220;&amp;&#8221;)):loc;<br />
reloaded = loc!=&#8221;"?(loc==&#8221;true&#8221;):reloaded;</strong></p>
<p><strong>function reloadOnceOnly() {<br />
if (!reloaded)<br />
window.location.replace(window.location+&#8221;?reloaded=true&#8221;);<br />
}<br />
reloadOnceOnly();<br />
&lt;/script&gt; </strong></p></blockquote>
<p>I found this in Google, but I had to spend some hours before I did it. So I think this article will be helpful for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/07/how-to-reload-a-page-only-once-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Showing an Image on Remote Server Error</title>
		<link>http://www.lampdocs.com/blog/2008/05/showing-an-image-on-remote-server-error/</link>
		<comments>http://www.lampdocs.com/blog/2008/05/showing-an-image-on-remote-server-error/#comments</comments>
		<pubDate>Tue, 06 May 2008 16:43:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTML and Javascript Tips]]></category>
		<category><![CDATA[banner error fixing]]></category>
		<category><![CDATA[hotlinking error]]></category>
		<category><![CDATA[image on remote server error]]></category>

		<guid isPermaLink="false">http://www.lampdocs.com/blog/?p=51</guid>
		<description><![CDATA[If you&#8217;re hotlinking images from other servers (this is often used when adding banner codes), you might face the situation when remote server becomes unavailable. This will spoil your site look, if you don&#8217;t add a simple code, that allows to solve this issue. &#60;img src="BANNER URL(REMOTE)" onError="this.src='LOCAL URL SHOWN ON REMOTE SERVER ERROR'" height=31 [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re hotlinking images from other servers (this is often used when adding banner codes), you might face the situation when remote server becomes unavailable. This will spoil your site look, if you don&#8217;t add a simple code, that allows to solve this issue.<br />
<code>&lt;img src="BANNER URL(REMOTE)" onError="this.src='LOCAL URL SHOWN ON REMOTE SERVER ERROR'" height=31 width=88&gt;</code></p>
<p>This simple code will save you from worrying on remote server uptime. That&#8217;s also a nice solution for showing remote server uptime &#8211; if you cannot get an image from remote server, the server shoulf be experiencing problems. You this and you&#8217;ll forget about banners with X signs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lampdocs.com/blog/2008/05/showing-an-image-on-remote-server-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

