In article <nYKdndJDRIs41izdRVn-jg@comcast.com>, Pat Scott
<badmailaddr@aol.com> wrote:
[color=blue]
> I am looking for a general purpose javascript snippet that enables me to
> <div> or <span> HTML to make portions of the form be hidden and then appear.
> The form contains about 12 sections and some sections can contain
> subsections. When the user clicks on a checkbox, I want previously hidden
> text boxes, radio buttons, text, drop down menus, and additional checkboxes
> to appear. In some cases, clicking on a checkbox in a section can cause
> additional previously hidden text boxes, radio buttons, text, drop down
> menus, and additional checkboxes to appear.
>
> Within each section, a list of individual names is displayed with an initial
> checkbox beside each name being displayed. Clicking the checkbox beside a
> name is what triggers the hidden info to be displayed. The server side
> application is written in php and the field names are assigned using
> brackets as the array is created. As an example the HTML checkbox beside
> the first name <input type='checkbox' name='sect1custname[1]' value'First
> Name'> The HTML for the next name woud be exactly the same except the name
> field would be defined as name='sect1custname[2]'. All of the other input
> buttons, boxes, menus, and text would use the same naming conventions so
> that the server side module can correctly process the data.
>
> I am hoping to keep this as generic as possible so that we can add, change,
> and/or delete entire sections simply by creating the appropriate HTML and
> surrounding it with the correct <div> or <span>. I understand that there
> may need to be some javascript wrapped around the checkboxes.
>
> If you know of , or have, or can develop the code, please send particulars
> to jscott4272 at comcast dot net. If there are any costs associated with
> the code, just let me know what they are. If you have any questions or need
> additional information, please email them to me.
>
> Pat Scott
>
>
>
>[/color]
In styles have "visibility: hidden" if you want the division initially
hidden.
In the following function theMenu is the division id.
theAction is either "visible" or "hidden".
function showMenu(theMenu, theAction) {
if (document.getElementById)
{document.getElementById(theMenu).style.visibility = theAction;}
else if (document.layers) {document[theMenu].visibility = theAction;}
else {document[theMenu].style.visibility = theAction;}
}
It works for me but I give no guarantees.
--
Dennis Marks
http://www.dcs-chico.com/~denmarks/
To reply change none to dcsi.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----