Zubrag.com
October 17, 2018, 01:50:46 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Redirect new window full screen  (Read 30009 times)
aaa
Newbie
*
Posts: 8


« on: January 11, 2008, 02:46:27 AM »

Is there a way to input javascript on the redirect to open in a new window that is at full screen?

Thanks!

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: January 15, 2008, 06:05:27 AM »

Hi. Why don't you add javascript to resize window to the target page?
For example you want to redirect to my-protected-page.php. Place following into my-protected-page.php

<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>


source taken from http://support.microsoft.com/kb/287171
Logged
aaa
Newbie
*
Posts: 8


« Reply #2 on: January 15, 2008, 02:03:39 PM »

Is there a way to input javascript before hand? I think that is the only reason to remove the address bar, menu bar, button bar and status bar.

Thanks.
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #3 on: January 16, 2008, 11:01:50 AM »

The string you insert into the Redirect URL field is processed on server by PHP. PHP knows nothing about Javascript, so we cannot simply insert javascript in that field.

But maybe following would work for you.

Create some php file, for example redirects.php. File contents would be:

<html>
<head>
<script language="JavaScript">
window.open("<?php echo $_GET['url'] ?>",'newwindow',
'fullscreen=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
window.opener='x'; // avoid "The page is trying to close the window" message
window.close();
</script>
</head>
<body>
</body>
</html>

Than place your urls in following format into the Redirect URL:
http://www.example.com/path/to/the/redirects.php?url=PUT URL HERE

Summary: password protector will try to redirect to redirects.php passing real url as parameter. redirects.php would generate html page which would open fullsize window without toolbar. Original window will be closed.
Logged
aaa
Newbie
*
Posts: 8


« Reply #4 on: January 16, 2008, 04:24:19 PM »

Tried, but the script doesn't work.

There is a blank page on the redirect, and the address box is showing the redirect url string, not the final url.

I checked the source code of the blank page and it is "redirects.php" page. Something isn't being processed I guess. The opening of a new window, and then the closing of this one. Does something need to go in the body section?

Thanks a bunch!
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #5 on: January 04, 1980, 04:20:41 AM »

What is the source of that empty page? Did it replace <?php ?> with actual URL?  Do you have javascript enabled in the browser?
Logged
aaa
Newbie
*
Posts: 8


« Reply #6 on: January 19, 2008, 10:25:10 AM »

Sorry for the delay in getting back, I wanted to try different scripts that do the same, but have had no luck so far.

Regarding the variables passing through, yes that did work. It's just not loading the page.

Thanks.
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #7 on: January 19, 2008, 03:38:18 PM »

Please try again. I fixed code above. One line was broken into two, causing error.
Note: popup blockers may not allow you to open window.
Logged
aaa
Newbie
*
Posts: 8


« Reply #8 on: January 19, 2008, 03:47:53 PM »

Now, there is the blank page as before and a prompt "Do you want to close window?" The directed page is not coming in.
Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #9 on: January 21, 2008, 09:17:59 AM »

I had the same "Do you want to close window?", and my popup blocker blocked new window.

in order for this to work popup blockers must be disabled. It works ok with popup blocker disabled.
Logged
wendyrosepairs
Newbie
*
Posts: 9


« Reply #10 on: June 11, 2014, 02:13:32 AM »

Yeah. I know the otao supply lots of the different model smartphone protector. High quality, good brand.
Logged
wendyrosepairs
Newbie
*
Posts: 9


« Reply #11 on: June 14, 2014, 02:17:29 AM »

Here i recommend you enter OTAO which can supply lots of premium protective film to protect your window full screen. Really wonderful.

OTAO has proprietary surface processing craft , which is helpful in protecting daily using dirts from the screen protector.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC