and which was solved with an example of using a virtual field checkbox. However, I am having trouble duplicating that solution when using a regular field checkbox. Could someone tell me what I am doing wrong?
(script from previous post that used virtual field checkbox and which works when I try to use it)
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.
Question
havingtrouble
An earlier poster asked about how to do collapsible sections using a checkbox in a datapage:
(viewtopic.php?f=3&t=12483)
and which was solved with an example of using a virtual field checkbox. However, I am having trouble duplicating that solution when using a regular field checkbox. Could someone tell me what I am doing wrong?
(script from previous post that used virtual field checkbox and which works when I try to use it)
-------------------------------------------------
Code:
Hello there !
function check(){
if(document.getElementById('cbParamVirtual1').checked)
{document.getElementById('displayer').style.display ="inline";}
else
{document.getElementById('displayer').style.display ="none";}
}
document.getElementById('cbParamVirtual1').onchange = check;
--------------------------------------------------
I am trying to replace the virtual field checkbox with a regular field checkbox. In my case, my fieldname is Door and which is a checkbox.
However, when I use fieldname Door in the above script it does not work, for instance:
-----------------------------------------------------
Code:
Hello there !
function check(){
if(document.getElementById('Door').checked)
{document.getElementById('displayer').style.display ="inline";}
else
{document.getElementById('displayer').style.display ="none";}
}
document.getElementById('Door').onchange = check;
-----------------------------------------------------
Please let me know why a regular field checkbox is not working but a virtual one would and can someone post the proper script that will work.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
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.