How to resize screen to fullsize in php

by 6 replies
7
Hi there,

I need some help with resizing my offer urls to full screen.

I'm doing PPV marketing and i don't want to have my offer in a 800px by 600px window. because it will hurt my conversions.

Now I'm using a php redirect to redirect people to the right offer with the following code:

<?php

header( 'Location: myofferurl.com' ) ;

?>

and i added a full screen javascript code below the php code:

<script language="JavaScript1.2">
var myWidth = screen.width;
var myHeight = screen.height;

top.resizeTo(myWidth, myHeight);
top.moveTo(0,0);
</script>

But unfortunately this does not open a new window in full screen.

so i hope somebody can show me how this can be done the right way.

Thanks for your help.
#programming #fullsize #php #resize #screen
  • That behavior might work in some browsers, but not others (I don't remember which). It's disabled these days because such aggressive behavior is detrimental to users.

    If you open a popup (popups will open in response to a click in all major browsers), you can size it however you want.
    • [1] reply
    • Yes, i realize that my popups will open in response to a click. but thats not what i want.

      i need to have my redirection url open in an new window at full size.
      i also tried this script:

      <script language="JavaScript">
      window.onload = maxWindow;

      function maxWindow()
      {
      window.moveTo(0,0);


      if (document.all)
      {
      top.window.resizeTo(screen.availWidth,screen.avail Height);
      }

      else if (document.layers||document.getElementById)
      {
      if (top.window.outerHeight<screen.availHeight||top.wi ndow.outerWidth<screen.availWidth)
      {
      top.window.outerHeight = screen.availHeight;
      top.window.outerWidth = screen.availWidth;
      }
      }
      }
      </script>

      but this also seems not to work.
      • [1] reply

Next Topics on Trending Feed