NameSilo

Displaying Content When A Checkbox Is Checked??

Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Namecheap AuctionsNamecheap Auctions
Watch

TWM

Web Marketing SpecialistEstablished Member
Impact
9
I did this before, but i just cant remember how. I thought it was with javascript. Can someone show me a script that will do this?

When you check a checkbox, content is displayed, and when you uncheck it, the content goes away.

THANKS ALOT!!
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
0
Close
exactly what i needed, thanks
 
0
Close
Isn't it possible to use onClick and go to http://CURRENT_PAGE?checkboxClicked=true?
 
0
Close
0
Close
stscac said:
some people do not have accounts there or have been blocked because of someone elses wrong doing on the isp. please post the content in this thread.

-Steve
Do you need it? The thread starter idevisedesign already posted his problem was solved.
 
0
Close
Get a new ISP ;)

<head> tags put this java script in

<script language=javascript type='text/javascript'>
function hideDiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideShow').style.visibility = 'hidden';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'hidden';
}
else { // IE 4
document.all.hideShow.style.visibility = 'hidden';
}
}
}

function showDiv() {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('hideShow').style.visibility = 'visible';
}
else {
if (document.layers) { // Netscape 4
document.hideShow.visibility = 'visible';
}
else { // IE 4
document.all.hideShow.style.visibility = 'visible';
}
}
}
</script>

As you can see it gets the div ID for each of the browsers and hides it or shows it. I named the Div Id hideShow to make it easy for you.

Then in your document put in your Div element the id name hideShow you can change this of course

<div id="hideShow" ..etc>
My content
</div>

and this to call the javascript to hide it

<a href="javascript:hideDiv()">Hide Div</a>

and this to show it

<a href="javascript:showDiv()">show Div</a>
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back