It is currently Sun Oct 13, 2024 11:37 pm


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Full screen button works only when going in, not out
PostPosted: Thu Jan 27, 2022 1:01 pm 
Newbie
Newbie

Joined: Sun Jan 16, 2022 6:45 am
Posts: 5
Hi!

I work on tableau, and I've created several buttons on top of the normal tableau page
(unfortunately can't export the code online).

the problem is, when I enter the fullscreen using the button - It works. but when I try to click it again to exit, it doesn't. if I press escape to exit the mode, the button works again and again.

I'm going to write down the relevant code-

#HTML
<div class="fullscreenbutton"><span style="cursor:pointer" onclick="toggleFullscreen(document.body)">
<img src="FullScreen.png" style="width:30px;height:30px">
</span></div>

#CSS
.fullscreenbutton {
position: absolute;
top: 13%;
right: 0.5%;
color: #818181;
}
#JS
function toggleFullscreen(doc){
if (!document.fullscreenElement && !document.webkitFullscreenElement && !document.mozFullscreenElement && !document.msFullscreenElement)
{
if(doc.requestFullscreen) {doc.requestFullscreen();}
else if (doc.webkitRequestFullscreen) {doc.webkitRequestFullscreen();}
else if (doc.msRequestFullscreen) {doc.msRequestFullscreen();}
else if (doc.mozRequestFullscreen) {doc.mozRequestFullscreen();}
} else
{
if(doc.exitFullscreen) {doc.exitFullscreen();}
} else if (doc.webkitExitFullscreen) {doc.webkitExitFullscreen();}
else if (doc.msExitFullscreen) {doc.msExitFullscreen();}
else if (doc.mozExitFullscreen) {doc. [url=xxxxxxxxx]voojio[/url]msCancelFullscreen();}
}


Thank you!


Last edited by SalinaS on Thu Feb 17, 2022 5:06 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Full screen button works only when going in, not out
PostPosted: Tue Feb 01, 2022 5:42 am 
Newbie
Newbie

Joined: Wed Apr 29, 2020 4:53 pm
Posts: 25
Hello,

Please have in mind that the forum is designed for out hosting services and we cannot really assist you with custom website development

Best Regards,
Bobby Banev
Moderators team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ]  Moderators: Moderators, Support Team

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Hosting | Domains | Servers | Extras | Order | Support | Contacts | FreeHostia © 2011