Full screen

It doesn't matter if you do all the error checking in the world, or if you have the most beautiful graphics, if your site or application design isn't usable, it's not going to do well. Get input and advice on usability and user interface issues here.

Moderator: General Moderators

Post Reply
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Full screen

Post by quioske »

Hi all,

I am on to the maintenance of PHP web based application.

the application is currently opening in browser with all sort of tool bar and address bar.

i want to make the application to open in full screen with only close button at the top-right corner.

how can i do this

thanks in advance
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

You'll want to look into javascript's window.open() method.
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Re: Full screen

Post by quioske »

In the application, they are not using window.open() .

is there any other way through which i can do this , like CSS.

i cannot change the code.

thanks for the reply
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

I don't think you can do this without opening a new window.

You certainly can't do it with CSS...as this would be very intrusive, and I doubt any browser would let you.

I'm under the impression that the only way is with javascript, using window.open(). I've done a bit of googling and haven't found anything different.

Why can you not edit the code, may I ask?
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Re: Full screen

Post by quioske »

jackpf,thanks for the reply

i have to go through the updation of code on each n every page.

That is the reason , i am looking for some external coding to open the application in full screen

i have seen it is using include_once() to open the file.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

I think you misunderstand - this is javascript, not php.

All you need to do is open the application using window.open(). So all you should need to change is the index page.
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Re: Full screen

Post by quioske »

can u pls tell me how to do this with window.open()

i need only close button there

thanks for the reply jackpf

you have helped me a lot
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

Well, on the index page, you could put something like this:

echo '<a href="#" onclick="window.open(\''.$_SERVER['PHP_SELF'].'\', \'full_screen\', \'toolbars=no, width=1000, height=750\');">Click here to open application in full screen</a>';

(I didn't include it in

Code: Select all

tags since it strips out escaped quote...cause it's stupid.)
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Re: Full screen

Post by quioske »

thanks for the reply,

But what i need is a PHP code to open the page in full screen automatically.

thanks
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

You can't do that with PHP. That's why I'm showing you how to do it in javascript.

If you want it to open automatically, you can use:

Code: Select all

window.onload = function()
{
window.open(.......open the window...
}
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Re: Full screen

Post by quioske »

Hi,

I am using this script to resize the window.

it is working fine in IE and mozilla, but not working in chrome and safari.

i need cross browser compatibility for all browser

moreover this code is not hiding the menu bar , addressbar .

(this script is taken from microsoft website(http://support.microsoft.com/kb/287171)
any one has idea,how can i do this ?

Code: Select all

<script language="JavaScript">
window.onload = maxWindow;
 
function maxWindow()
{
window.moveTo(0,0);
 
 
if (document.all)
{
  top.window.resizeTo(screen.availWidth,screen.availHeight);
}
 
else if (document.layers||document.getElementById)
{
  if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
  {
    top.window.outerHeight = screen.availHeight;
    top.window.outerWidth = screen.availWidth;
  }
}
}
 
</script>
 
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

My god, never use anything off the Microsoft website.

This is how I'd do it:

Code: Select all

window.resizeTo(window.innerWidth, window.innerHeight);
And when using window.open(), you need to specify 'toolbar=false' as the third argument.
quioske
Forum Newbie
Posts: 9
Joined: Mon Jul 27, 2009 8:18 am

Re: Full screen

Post by quioske »

With window.resize,Can I specify that menubar and toolbar should be off?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Full screen

Post by jackpf »

No, like I said, you have to do that with window.open.
Post Reply