<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Programação em ASP &#187; getElementById</title>
	<atom:link href="http://quantodaniel.wordpress.com/tag/getelementbyid/feed/" rel="self" type="application/rss+xml" />
	<link>http://quantodaniel.wordpress.com</link>
	<description>Estudando como programar!</description>
	<lastBuildDate>Sun, 02 Aug 2009 06:37:57 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='quantodaniel.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/bfc920e28461661a78837d8e9ef12218?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Programação em ASP &#187; getElementById</title>
		<link>http://quantodaniel.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://quantodaniel.wordpress.com/osd.xml" title="Programação em ASP" />
		<item>
		<title>Ocultar itens com JavaScript em ASP</title>
		<link>http://quantodaniel.wordpress.com/2007/11/14/ocultar-itens-com-javascript-em-asp/</link>
		<comments>http://quantodaniel.wordpress.com/2007/11/14/ocultar-itens-com-javascript-em-asp/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 13:36:48 +0000</pubDate>
		<dc:creator>quantodaniel</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[block]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[getElementById]]></category>
		<category><![CDATA[ocultar itens]]></category>

		<guid isPermaLink="false">http://quantodaniel.wordpress.com/2007/11/14/ocultar-itens-com-javascript-em-asp/</guid>
		<description><![CDATA[Olá pessoal, prometi falar sobre sessões, porém vou deixar para próxima.
Hoje falerei um pouco sobre como esconder itens na página utilizando funções em JavaScript,  parece um bixo de sete cabeças, ma é muito mais fácil do que imaginamos.
Bom, a primeira coisa que temos em mente é que: Cada usuário prefere um navegador&#8230; Então temos que [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=quantodaniel.wordpress.com&blog=2059213&post=8&subd=quantodaniel&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Olá pessoal, prometi falar sobre sessões, porém vou deixar para próxima.</p>
<p>Hoje falerei um pouco sobre como esconder itens na página utilizando funções em JavaScript,  parece um bixo de sete cabeças, ma é muito mais fácil do que imaginamos.</p>
<p>Bom, a primeira coisa que temos em mente é que: Cada usuário prefere um navegador&#8230; Então temos que fazer uma função simples e funcional para que não dê erro em nenhum navegador&#8230; Impossível? Não&#8230;</p>
<p>Um simples exemplo de mostra e oculta, você pode ver clicando <a title="Exemplo" href="http://www.linkoff.com.br/itens.asp" target="_blank">AQUI</a>.</p>
<p>Segue o código abaixo:</p>
<blockquote>
<ol>
<li>Primeiro criamos o link chamando a função Java:</li>
<li>
<pre>&lt;a href="javascript:Oculta('primeiro');"&gt;
Clique aqui para ocultar ou exibir a caixa abaixo. &lt;/a&gt;</pre>
</li>
<li>Depois criamos um DIV com um ID, aqui chamdo de &#8220;PRIMEIRO&#8221;:</li>
<li>
<pre>&lt;div style="display:block" id="primeiro"&gt;&lt;/div&gt;</pre>
</li>
<li>Agora colocamos um textarea dentro da div:</li>
<li>
<pre>&lt;div style="display:block" id="primeiro"&gt;       
&lt;textarea name="textarea" cols="20" rows="5"&gt;&lt;/textarea&gt; 
&lt;/div&gt;</pre>
</li>
<li>Pronto, agora é só colocar a função em JavaScript.</li>
<li>A função se chama Oculta, passando o nome da div como parâmetro:</li>
<li>
<pre>&lt;script&gt; function Oculta(cxa){ 
if (document.getElementById(cxa).style.display=='none'){     
document.getElementById(cxa).style.display='block';         
}else{         
document.getElementById(cxa).style.display='none';     
} } 
&lt;/script&gt;</pre>
</li>
<li>Pronto, agora resta salvar e testar a página.</li>
</ol>
</blockquote>
<p>Pense nas grandes possibilidades que você pode ter utilizando esse sitema.</p>
<p>Quando disse no topo da página que temos que fazer uma função para todos os navegadores, vocês perceberam onde está essa diferença? Não? Está a mostra quando definimos o display=&#8221;block&#8221;. No FireFox não podemos utilizar display=&#8221;inline&#8221;, como fazemos no IE. Essa era a diferença.</p>
<p>Até a próxima.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/quantodaniel.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/quantodaniel.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/quantodaniel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/quantodaniel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/quantodaniel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/quantodaniel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/quantodaniel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/quantodaniel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/quantodaniel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/quantodaniel.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/quantodaniel.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/quantodaniel.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=quantodaniel.wordpress.com&blog=2059213&post=8&subd=quantodaniel&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://quantodaniel.wordpress.com/2007/11/14/ocultar-itens-com-javascript-em-asp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6e1a13a71cc89521c4b6e83f914cbac1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">quantodaniel</media:title>
		</media:content>
	</item>
	</channel>
</rss>