[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-08-2003, 07:01 AM   #1 (permalink)
NamePros Member
 
Mp)Tarh's Avatar
 
Join Date: Aug 2003
Location: Ontario, Canada
Posts: 101
171.00 NP$ (Donate)

Mp)Tarh is an unknown quantity at this point


Is this possible in JavaScript?

Does anyone know how to set the current window to fullscreen with JavaScript? I want the current window to be fullscreen WITHOUT opening a new window...
__________________
Yeah... I knew that. What?
Mp)Tarh is offline  
Old 08-08-2003, 08:54 AM   #2 (permalink)
NamePros Member
 
Join Date: Jul 2003
Posts: 69
107.00 NP$ (Donate)

crEA-tEch is an unknown quantity at this point


if this is for a website going going public why wud u want to annoye your visiter making the window auto-maximise? I'd probably close the page if it did that?

nick
__________________
M-Factor
crEA-tEch
crEA-tEch is offline  
Old 08-08-2003, 11:30 AM   #3 (permalink)
NamePros Member
 
Mp)Tarh's Avatar
 
Join Date: Aug 2003
Location: Ontario, Canada
Posts: 101
171.00 NP$ (Donate)

Mp)Tarh is an unknown quantity at this point


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?
Mp)Tarh is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:32 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85