To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-28-2006, 08:05 PM   #1
krrose27
Senior Member
 
Join Date: Nov 2005
Posts: 112
Creating a form when a certian checkbox is clicked stuff shows up.

I have never used java sbefore in websites but people tell me this is where it would be used.
I have a form, and lets say they check this radio button that says maried, well when they do more stuff will pop up under it thatll have all these trhings like 1year {radio button} 2 years {radio button} and so forth and so on.

That was just an example. Any clue on how to do that?
krrose27 is offline   Reply With Quote
Old 03-28-2006, 10:17 PM   #2
bpat1434
NMaOtBG
 
bpat1434's Avatar
 
Join Date: Oct 2004
Location: Around 255.255.255.0
Posts: 8,093
You could have the form hard coded in there, and just set the visibility to visible or display to block when they check the checkbox. I'm not big in JS (just learning) but I know it's possible. Something with document.getElementById.(id_name).style='visibility: hidden' or something like that.
bpat1434 is offline   Reply With Quote
Old 03-28-2006, 11:23 PM   #3
JPnyc
Administrator
 
Join Date: Jan 2005
Posts: 963
Well to clear up a popular misconception, it's Javascript, not Java. The 2 are not related.

Yes, you use either document.getElementById('idname').style.visibility or you can use

document.getElementById('idname').style.display="none" or "block"

Or since they're in a form, you can reference like this:

document.forms[0].elements[elementNumber].style

Put a 0 in place of element number for the 1st element,1 for the 2nd, 2 for the 3rd, etc.
__________________
PHP builder Online Community Manager

JPnyc is online now   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 02:18 PM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.