I have an html block in a Details page where I'm trying to show/hide a div based on the value of a Virtual field. The virtual field is set to Hidden and gets an Authentication value on load for data (a country name, in this case).
I can't quite get the show/hide to work. I've used this code before and it works well so there must be some syntax mistake in this example. Does anyone have an idea with that might be? Thanks!
<divid="section1">Print AUS Version</div><script>var v_virt = document.getElementByID("cbParamVirtual13").value;if(v_virt=="Australia"){
document.getElementById('section1').style.display ="block";}else{
document.getElementById('section1').style.display ="none";}</script>
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
DesiLogi
Hi,
I have an html block in a Details page where I'm trying to show/hide a div based on the value of a Virtual field. The virtual field is set to Hidden and gets an Authentication value on load for data (a country name, in this case).
I can't quite get the show/hide to work. I've used this code before and it works well so there must be some syntax mistake in this example. Does anyone have an idea with that might be? Thanks!
Link to comment
Share on other sites
6 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.