tinfanide Posted September 29, 2011 Share Posted September 29, 2011 <script>function lightboxPage(opt){var url = "lightbox.html";var target = "_blank";var windowFeatures = "fullscreen=1";window.open(url, target, windowFeatures);}</script></head><a href="javascript: lightboxPage();">Lightbox</a> I want to pass 0 or 1 to the fullscreen property.I have tried but it fails: <script>function lightboxPage(opt){var url = "lightbox.html";var target = "_blank";var windowFeatures = "fullscreen='""+opt+'"window.open(url, target, windowFeatures);}</script></head><a href="javascript: lightboxPage(1);">Lightbox</a> Link to comment Share on other sites More sharing options...
Synook Posted September 29, 2011 Share Posted September 29, 2011 Your quotes are the wrong way round - think about it... Link to comment Share on other sites More sharing options...
tinfanide Posted September 29, 2011 Author Share Posted September 29, 2011 <script>function lightboxPage(opt){ var url = "lightbox-gallery.html"; var target = "_blank"; var windowFeatures = "fullscreen="+opt; window.open(url, target, windowFeatures); }</script> I use 0 or 1 instead of no or yes for the opt parameter and do this"fullscreen=" + opt;But if the parameter is no or yes, it fails. Link to comment Share on other sites More sharing options...
justsomeguy Posted September 29, 2011 Share Posted September 29, 2011 What fails? The code is correct. Link to comment Share on other sites More sharing options...
tinfanide Posted September 30, 2011 Author Share Posted September 30, 2011 <script>function lightboxPage(opt){ var url = "lightbox-gallery.html"; var target = "_blank"; var windowFeatures = "fullscreen="+opt; window.open(url, target, windowFeatures); }</script> <a href="javascript: lightboxPage(yes);">Lightbox</a> I didn't know what's wrong with the code. The above one was what I wrote.Maybe I should do like this: lightboxPage('yes') Should I? Really no idea of how to pass the parameter in this case... Link to comment Share on other sites More sharing options...
Don E Posted September 30, 2011 Share Posted September 30, 2011 Should work with: lightboxPage('yes'); Link to comment Share on other sites More sharing options...
tinfanide Posted September 30, 2011 Author Share Posted September 30, 2011 Well... it works but the opened window is not full screen as expected.It's full screen if the parameter is an integer (0 or 1). Link to comment Share on other sites More sharing options...
justsomeguy Posted September 30, 2011 Share Posted September 30, 2011 Then use a 1 or 0. Link to comment Share on other sites More sharing options...
tinfanide Posted October 1, 2011 Author Share Posted October 1, 2011 That means yes or no cannot be passed as parameters? Link to comment Share on other sites More sharing options...
Ingolme Posted October 1, 2011 Share Posted October 1, 2011 Test it.If "yes" and "no" don't work, then you can't use them. Mozilla documentation says that fullscreen is not supported by any browser except Internet Explorer 6.https://developer.mozilla.org/en/DOM/window.open#section_8 fullscreen Do not use. Not implemented in Mozilla. There are no plans to implement this feature in Mozilla. This feature no longer works in MSIE 6 SP2 the way it worked in MSIE 5.x. The Windows taskbar, as well as the titlebar and the status bar of the window are not visible, nor accessible when fullscreen is enabled in MSIE 5.x. fullscreen always upsets users with large monitor screen or with dual monitor screen. Forcing fullscreen onto other users is also extremely unpopular and is considered an outright rude attempt to impose web author's viewing preferences onto users. Link to comment Share on other sites More sharing options...
tinfanide Posted October 1, 2011 Author Share Posted October 1, 2011 Yes, I've read that document when I've been dragging in the fullscreen issue. AndI've been searching solutions online and there's few "possible" solutions. It seems it's not possible. Yes, I've also tested I cannot use yes or no as parameter. Why I ask is just curiosity. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.