-1

I have the below requirement: I am using and ADF jsff page. On that page, i have a SelectBooleanCheckbox which gets rendered even before the entire page content load and is therefore available for the user to click which is not desirable. I want to set visibility as false for that component and then use Javascript later to make it visible only after the entire page loads. Thoughts?

divibisan
  • 11,659
  • 11
  • 40
  • 58

1 Answers1

0

for example This is the HTML code:

<input type="checkbox" id="checkbox"  style="display:none">

you can add this for body tag :

<body onload="checkbox()">

this is the function with JS and Jquery examples (use only one option):

function checkbox(){

 document.getElementById("checkbox").style.display=""; // option 1
 $("#checkbox").fadeIn();// option 2
 $("#checkbox").show();// option 3

 }

if you need to be after a while ,for example 1 second :

function checkbox(){

 setTimeout(function(){   document.getElementById("checkbox").style.display="";}, 1000); // option 1
 $("#checkbox").fadeIn(1000);// option 2
 $("#checkbox").show(1000);// option 3

 }
Mohammed Elhag
  • 4,272
  • 1
  • 10
  • 18
  • I have written below code: In the jspx, i have added the method function onPageLoad(evt) { $("input[name*='acceptTermsConditionBox']").attr("visible", true); } In the jsff his component's visiblity is set to false and the clientComponent is set to true. I am trying to set it false after the page loads using this method. – sonali srivastava May 02 '16 at 09:04