<?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>Cyberactiva web development and optimisation &#187; HTML</title>
	<atom:link href="http://www.cyberactiva.com/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberactiva.com</link>
	<description>Every day&#039;s life about programming and webmarketing</description>
	<lastBuildDate>Mon, 11 Apr 2011 05:15:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Select tag clickable under the above transparent div layer</title>
		<link>http://www.cyberactiva.com/2009/10/select-tag-clickable-under-the-above-transparent-div-layer/</link>
		<comments>http://www.cyberactiva.com/2009/10/select-tag-clickable-under-the-above-transparent-div-layer/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 08:34:36 +0000</pubDate>
		<dc:creator>Claudio Barba</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.cyberactiva.com/?p=34</guid>
		<description><![CDATA[<p>It bothers me a lot, when I can&#8217;t find a solution for a problem that do not depend on me&#8230; Anywway here is the problem and the work-around solution I found.</p>
<p>Let&#8217;s say you have a form on the page, with some &#60;select&#62; tags.</p>
<p>Now, you want that on the onclick event of the submit,  a semi [...]]]></description>
			<content:encoded><![CDATA[<p>It bothers me a lot, when I can&#8217;t find a solution for a problem that do not depend on me&#8230; Anywway here is the problem and the work-around solution I found.</p>
<p>Let&#8217;s say you have a form on the page, with some &lt;select&gt; tags.</p>
<p>Now, you want that on the onclick event of the submit,  a semi transparent DIV appears above the form, in order to block the user to change the data on the form.</p>
<p>The .html (or whatever you are using) should be like:</p>
<blockquote><p>&lt;script language=&#8221;JavaScript&#8221;&gt;<br />
function show(layer_ref) {</p>
<p>if (document.all) { //for IE 4 or 5 (or 6 beta)<br />
eval( &#8220;document.all.&#8221; + layer_ref + &#8220;.style.display = &#8216;block&#8217;&#8221;);<br />
}<br />
if (document.layers) { //for NETSCAPE 4 or below<br />
document.layers[layer_ref].display = &#8216;block&#8217;;<br />
}<br />
if (document.getElementById &amp;&amp;!document.all) {<br />
myel = document.getElementById(layer_ref);<br />
myel.style.display = &#8216;block&#8217;;<br />
}<br />
}<br />
&lt;/script&gt;<br />
&lt;div id=&#8221;form1&#8243;&gt;<br />
&lt;form&gt;<br />
&lt;select name=&#8221;test&#8221;&gt;<br />
&lt;option&gt;test&lt;/option&gt;<br />
&lt;/select&gt;<br />
&lt;input type=&#8221;submit&#8221; onclick=&#8221;javascript:show(&#8217;waiting&#8217;);&#8221;&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;waiting&#8221; style=&#8221;display:none;&#8221;&gt;<br />
&lt;/div&gt;</p></blockquote>
<p>In the css, you should put</p>
<blockquote><p>#waiting {<br />
position:absolute;<br />
width: 100%;<br />
height: 100%;<br />
top:0;<br />
left:0;<br />
background: #cccccc;<br />
z-index:2;<br />
-moz-opacity:0.5;<br />
opacity:0.5;<br />
filter: Alpha(opacity:80);</p>
<p>}</p></blockquote>
<p>The problem will immediately appear when you launch the page and click on the submit&#8230;</p>
<p>Actually, the select tag will remain active, even if it is under the &#8220;waiting&#8221; layer.</p>
<p>The only solution I found, is to hide the DIV form1&#8230; so, from the above code you should change only:</p>
<blockquote><p>onclick=&#8221;javascript:show(&#8217;waiting&#8217;);hide(&#8217;form1&#8242;);&#8221;</p></blockquote>
<p>and of course add the new hide javascript function (just change &#8216;block&#8217; with &#8216;none&#8217;):</p>
<blockquote><p>function hide(layer_ref) {</p>
<p>if (document.all) { //for IE 4 or 5 (or 6 beta)<br />
eval( &#8220;document.all.&#8221; + layer_ref + &#8220;.style.display = &#8216;none&#8217;&#8221;);<br />
}<br />
if (document.layers) { //for NETSCAPE 4 or below<br />
document.layers[layer_ref].display = &#8216;none&#8217;;<br />
}<br />
if (document.getElementById &amp;&amp;!document.all) {<br />
myel = document.getElementById(layer_ref);<br />
myel.style.display = &#8216;none&#8217;;<br />
}<br />
}</p></blockquote>
<p>I am very curious to know if somebody could solve this issue differently, LET ME KNOW!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cyberactiva.com/2009/10/select-tag-clickable-under-the-above-transparent-div-layer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

