..:: MX Studio Fóruns ::..: Checkbox e Textarea - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Checkbox e Textarea

#1 User is offline   crix11 

  • Group: Membros
  • Posts: 3
  • Joined: 12-August 09

Posted 24 July 2010 - 07:49 PM

<html>
<head>
<title>(Type a title for your page here)</title>
<script language="JavaScript">
<!--

function enable_text(){
		rs = document.getElementById('rapidshare');
		mu = document.getElementById('megaupload');
		hf = document.getElementById('hotfile');

		if(rs.checked || mu.checked || hf.checked){
				document.f1.other_text.disabled = false;
		}else{
				document.f1.other_text.disabled = true;
		}
}
//-->
</script>
<script language="JavaScript">
<!--
function rapidshare1(){
		rs = document.getElementById('rapidshare');

		if(rs.checked){
			document.f1.other_text.disabled = false;
			document.getElementById( "download" ).innerHTML += "[b]Rapidshare:[/b]\n\n\n\n"
		}
		else{
			document.f1.other_text.disabled = true;
			document.getElementById( "download" ).innerHTML = " "
		}

}
//-->
</script>
<script language="JavaScript">
<!--
function megaupload1(){
		mu = document.getElementById('megaupload');

		if(mu.checked){
			document.f1.other_text.disabled = false;
			document.getElementById( "download" ).innerHTML += "[b]Megaupload:[/b]\n\n\n\n"
		}
		else{
			document.f1.other_text.disabled = true;
			document.getElementById( "download" ).innerHTML = " "
		}
}
//-->
</script>
<script language="JavaScript">
<!--
function hotfile1(){
		hf = document.getElementById('hotfile');

		if(hf.checked){
			document.f1.other_text.disabled = false;
			document.getElementById( "download" ).innerHTML += "[b]Hotfile:[/b]\n\n\n\n"
		}
		else{
			document.f1.other_text.disabled = true;
			document.getElementById( "download" ).innerHTML = " "
		}
}
//-->
</script>
</head>
<body>

<form name="f1" method="post"/>
	<!-- RAPIDSHARE -->
	<input name="RS" type="checkbox" id="rapidshare" onclick="rapidshare1()" style="vertical-align:middle"/>
	<img src="hosts/RS_icon.png" style="vertical-align:middle"/>
	<!-- MEGAUPLOAD -->
	<input name="MU" type="checkbox" id="megaupload" onclick="megaupload1()" style="vertical-align:middle"/>
	<img src="hosts/MU_icon.png" style="vertical-align:middle"/>
	<!-- HOTFILE -->
	<input name="HF" type="checkbox" id="hotfile" onclick="hotfile1()" style="vertical-align:middle"/>
	<img src="hosts/Hotfile_icon.png" style="vertical-align:middle"/></br>
   <textarea name="other_text" cols="50" rows="10" id="download" disabled="disabled"></textarea>
</form>

</body>
</html>


O que este código me está a fazer é quando clico na primeira checkbox aparece Rapidshare, quando clico na segunda aparece Rapidshare e Megaupload e quando carrego na terceira aparece, rapidshare, megaupload, hotfile, ate aqui está como quero, agora so me falta quando clico na checkbox de rapidshare, desaparecer o nome rapidshare da textarea, quando clico na checkbox megaupload, desaparecer o nome rapidshare da textarea e quando clico na checkbox de hotfile desaparece o nome da checkbox e coloca a textarea disable....isto pode acontecer por uma outra ordem qualquer.. qualquer duvida perguntem..

Obrigado.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)