Jump to content
  • 0

Nesting Buttons For Collapsible Sections


kmargolis
 Share

Question

Hi. I am aware of/able to create buttons with collapsible sections.

 

http://howto.caspio.com/tech-tips/creating-collapsible-sections.html

 

However, I would now like to nest the buttons.

 

For example, if I have eight buttons with collapsible sections, I would like to add two more buttons with collapsible sections. Each of these two buttons would have 4 buttons in their collapsible section, respectively.

 

Thanks. I would greatly appreciate your help/thoughts.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You can try to create a table around those fields in a section which needs to be collapsible in a group:

 

<input type="button" onClick="Dis(1)" value="Sec 1 Title"><br>
<table id="S1" style="display:none;"><td>

 

and close the table at the end of the fields:

</td></table><br>
 

now add the extra lines to the java script code. In the following code Dis(n) is a new function which is being called in the code above. Also in the line of the code below: var check = document.getElementById('S'+n); we are getting the ID from <table id="S1" style="display:none;"><td>

<script>
function Displayer(n)
{
var check = document.getElementById('Section'+n);
if(check.style.display == 'none')
{
check.style.display='inline';
}
else
{
check.style.display='none';
}
}
function Dis(n)
{
var check = document.getElementById('S'+n);
if(check.style.display == 'none')
{
check.style.display='inline';
}
else
{
check.style.display='none';
}
}
</script>


<!--JavaScript for Receiving Parameters:-->

<script>
var check = document.getElementById('Section1');
if('[@Parameter]' == 'value')
{
check.style.display='inline';
}
else
{
check.style.display='none';
}
</script>

:)  That should help !!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...