Jump to content
  • 0

$ for solution? Hiding multiple login windows - worked well but now doesnt ;^/


roattw

Question

Was usuing the how to Hide Multiple logins method successfully for some time

https://howto.caspio.com/tech-tips-and-articles/common-customizations/hiding-multiple-login-forms/

 All of a sudden it doesnt work and I cant find the issue:  https://www.ucemcme.com/faculty/

Authentication has i the header  

<div name="cb-auth-box">

and  </div> in the footer as it always has.  

Each report embed on this page is embedded via CB on Squarespace page and under each of the embeded script code for the DP I have the correct hide script:

<script>

if(document.getElementsByName("cb-auth-box")) {
var v_box = document.getElementsByName("cb-auth-box").length ;
for (i=1; i < v_box; i++) { document.getElementsByName("cb-auth-box")[i].style.display = "none" ; }
}

</script>

Obviously something has changed, but I cant find it.  Reasonable fee for the answer ;^)

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 1

Hi roattw,

You can check the article: https://howto.caspio.com/tech-tips-and-articles/common-customizations/hiding-multiple-login-forms/

1. For step 6 in the howto article, add the following code after "</div>" inside your Authentication's footer.

<script>
hideAuth();
</script>


2. For step 7 in the howto article, follow the same steps but use the updated script below.

<script>
function hideAuth(){
  if(document.getElementsByName("cb-auth-box")){
  	var v_box = document.getElementsByName("cb-auth-box").length ;
  	for (i=1; i < v_box; i++) { document.getElementsByName("cb-auth-box")[i].style.display = "none" ; }
  }
}
</script>

This should resolve your issue.

Link to comment
Share on other sites

  • 0

Hi MayMusic!  Im not sure its current though - or works.   Thirdcharm's code was shorter, more concise, and worked:

<script>
hideAuth();
</script>

 

<script>
function hideAuth(){
  if(document.getElementsByName("cb-auth-box")){
  	var v_box = document.getElementsByName("cb-auth-box").length ;
  	for (i=1; i < v_box; i++) { document.getElementsByName("cb-auth-box")[i].style.display = "none" ; }
  }
}
</script>

The one on the How To is more verbose and I couldnt get it to work.  I think they have some version confusion (?)

<script>
  var v_dpTotalCount = 3;
  var v_dpCounter = 0;
</script>

and

<script type="text/javascript">
document.addEventListener('DataPageReady', function (v_e) 
  {try{document.getElementsByName('cb-auth-box')[v_dpCounter].style.display = "none";}catch(v_e){}
    v_dpCounter +=1;
	  if( v_dpTotalCount <= v_dpCounter) 
     {if(document.getElementsByName("cb-auth-box")) 
        {var v_box = document.getElementsByName("cb-auth-box").length-1 ;
	       for (i=0; i < v_box; i++) { document.getElementsByName("cb-auth-box")[i].style.display = "none" ; }
		try{document.getElementsByName("cb-auth-box")[v_box].style.display = "” ;}catch(v_e){}
	       }
	    }
	 });

</script>

 

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...
×
×
  • Create New...