vnpeace
01-01-2004, 08:38 PM
How can I open the homepage of a website in full size of the window and there is no toolbar, no address bar etc.. no bars at all, just the vertical scrolbar and the close button?
|
Click to See Complete Forum and Search --> : Open a full screen web page vnpeace 01-01-2004, 08:38 PM How can I open the homepage of a website in full size of the window and there is no toolbar, no address bar etc.. no bars at all, just the vertical scrolbar and the close button? fredmv 01-01-2004, 08:43 PM Welcome to the forums. You can only open a completely fullscreen window in IE; in other browsers there will still be chrome when opened in a fullscreen window (the titlebar and minimize/maximize/close buttons). If you want to create a fullscreen window, try something like this:<input type="button" value="Launch fullscreen window" onclick="window.open('http://www.google.com/', '', 'fullscreen=1,scrollbars=1');" />Then, since in IE there is no browser chrome (including titlebar and other buttons as mentioned before), you should include a button or link to close the window for users that don't know about ALT + F4:<input type="button" value="Close" onclick="self.close();" /> vnpeace 01-01-2004, 08:59 PM Thanks a lot for your quick help, fredmv! I got it working but can I get rid off the window which are asking "Do you want to close this window?". Can we close a window without pressing any button? Thanks a lot! fredmv 01-01-2004, 09:47 PM You're quite welcome. You can, by default, only close windows from JavaScript that were created by JavaScript. This is for security reasons (just imagine how annoying it would be if some Website randomly closed your window)? However, you can use alternative methods (http://forums.webdeveloper.com/showthread.php?s=&threadid=21563) tp bypass this. vnpeace 01-01-2004, 10:13 PM Thanks a lot, fredmv! It really helps. However, when I click on the Close button, I want to close the current page and also the page that opens the current page by using the code: window.opener.close(); but it does not close the opener window. How can I get it done? Please help me one more time with this? Thanks! fredmv 01-01-2004, 10:13 PM Have you checked the link I provided? It should be quite easy to close the opener window. vnpeace 01-01-2004, 10:21 PM Yes, I have seen that page and use that code to close the page without pressing any button, it is really impressed. <a href="#" onclick="window.opener=null;parent.close();">Close window.</a> <object id="closes" style="display: none;" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Close" /> </object> <a href="#" onclick="closes.Click();">Close window.</a> However, I cannot close the opener window. My purpose is to close the 2 pages (the current and the opener window at the same time) by clicking a button on the opened page. Thanks! fredmv 01-01-2004, 10:27 PM opener.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>untitled</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> </head> <body> <object id="closes" style="display: none;" type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Close" /> </object> <a href="#" onclick="window.open('child.html', '', 'height=400,width=400');">Open child window.</a> </body> </html> child.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>untitled</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" /> </head> <body> <a href="#" onclick="self.close();opener.closes.Click();">Close all.</a> </body> </html> vnpeace 01-02-2004, 12:58 AM Dear fredmv, I copy exactly the source code to make the page opener.htm and child.html page. But unfortunately, the opener.htm is not closed when I click on Close All. Is there any problem? Thanks a lot for your very useful help. fredmv 01-02-2004, 01:05 AM You're quite welcome. The above code does work for me, so I'm not sure sure as to why it isn't working correctly for you. What version of IE are you running? vnpeace 01-02-2004, 01:07 AM I am using IE 5.00 fredmv 01-02-2004, 01:10 AM That's rather interesting considering I'm using IE6 and it's working correctly for me. Perhaps it isn't working correctly for you because of this? vnpeace 01-02-2004, 01:35 AM Dear fredmv, I tried with IE 6.0 but unfortunately it also does not work. I can change the properties (backgroud color etc) of the opener window but I cannot close it. Is there any other settings in the browser which is causing the problem. Thanks again! vnpeace 01-04-2004, 09:43 PM Dear fredmv, Do you have any good news about this problem? I have tried this on serveral PCs, IE5 and IE6 but the opener window is not closed. Thanks fredmv 01-04-2004, 09:49 PM Well, this has been a rather interesting problem but here's what I think. You aren't supposed to close the opener window with JavaScript in the first place. Your IE installations must have the patch installed so that it doesn't work anymore because after all, it should really be considered a bug since JavaScript shouldn't be allowed to do that. Therefore, just accept that the opener window will remain open, it really isn't that big of a deal. baranwalravi123 09-10-2007, 06:36 AM hi every body i have a IE 6.0 where my asp.net web page is woring fine in full screen using javascript. but when we put this page on server then title bar and status appears why the script not works here properly. thanks for any kind of help my code of javascript is function popUpWin() { //window.parent.close(); var myWin = window.open("FlashDemo.aspx","windowName","resizable=no,dependent=no,scrollbars=no,menubar=no,toolbar=no,status=no,Titlebar=no,Fullscreen=yes"); //window.open('FlashDemo.aspx',"","top=0,left=0,width=100%,height=100%,directories=false,location=false,menubar=yes,resizable=false,scr ollbars=yes,status=yes,toolbar=no,fullscreen=yes,titlebar=yes"); // if (window.focus) myWin.focus(); // myLink.target = windowName; } Mr Moo 09-10-2007, 06:42 AM Due to various new security settings in IE (and other browsers; because of phishing attacks), you won't be able to remove the address bar and status bar using JavaScript by default. You can change these settings under Tools > Internet Options > Security, but 99.9% (don't quote me on that) of your visitors are going to have the default settings. baranwalravi123 09-10-2007, 06:47 AM hi thanks for ur response if you be little bit more specific then i will try to resolve my problem thanks again webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |