| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #3 (permalink) |
| NamePros Member | Fullscreen mode is optional so there is no forcing involved. Anyway, I figured out how to do it myself.var screensettings = "small" function screenchange() { if (screensettings == "small") { if (document.layers) { if (top.window.innerWidth == screen.width) { alert("Window cannot be maximized when entering fullscreen mode."); } else { screensettings = "big"; fullscreen() } } else { if (top.document.body.offsetWidth == screen.width) { alert("Window cannot be maximized when entering fullscreen mode."); } else { screensettings = "big"; fullscreen() } } } else { screensettings = "small"; restore() } } function fullscreen() { if (document.layers) { top.window.resizeTo(screen.width+20,screen.height+ 300); top.window.moveTo(-10,-100); } else { top.window.resizeTo(screen.width+20,screen.height+ 300); top.window.moveTo(-10,-100); } } function restore() { if (document.layers) { top.window.resizeTo(200,200); top.window.moveTo(0,0); } else { top.window.resizeTo(200,200); top.window.moveTo(0,0); } }
__________________ Yeah... I knew that. What? |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |