OT-client-side question

M

middletree

I know this isn't the right forum, but this is driving me crazy, and I don't
think I'm very off, probably one little thing is keeping me from being
successful.

I'd like to have two radio buttons, and the first one will be selected by
default when the page loads. When it is selected, the two checkboxes below
the second radio button should be invisible. The only way to see the two
checkboxes is when the second radio button is selected. If you select it and
then go back to the first radio button, those checkboxes should disappear
again.

Here's what I have so far; I think I'm pretty close, but I am missing
something, don't know what:

In the <head> section:

<style>
#ReportTypeDiv {
display:none
}
</style>

then(watch the wrap):

<input type='radio' id='ReportType' name='ReportType' value='Summary'
onclick='document.getElementById("ReportTypeDiv").style.display=this.checked
?"block":"yes" ' checked>Show Summary Info
<input type='radio' id='ReportType' name='ReportType' value='Details'
onclick='document.getElementById("ReportTypeDiv").style.display=this.checked
?"block":"none" '>Show Detailed Info

<div class="ReportTypeDiv" id="ReportTypeDiv">
<!--if showing details, then choose whether to display internal notes, the
notes seen by the customer, or both-->
<input type='Checkbox' name='ShowInternal' value='true'>Show Internal
Notes
<input type='Checkbox' name='ShowExternal' value='true'>Show External
Notes
</div>
</form>
 
B

Bob Barrows

middletree said:
I know this isn't the right forum, but this is driving me crazy, and
I don't think I'm very off, probably one little thing is keeping me
from being successful.

Sorry, you've already used up your OT question for the year. :)
You'll have to post to the appropriate group. Look for one with "dhtml" in
its name.

Bob
 
B

Bob Barrows

middletree said:
Really? Wouldn't have thought of that, since this is client-side code.
That newgroup has a lot of activity and they happily deal with all questions
about vbscript, including client-side vbscript.

Oh, wait! Are you using jscript? Let's see ... oh, yes, so you are. make it
..scripting.jscript.

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,139
Messages
2,570,805
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top