Visualizzazione dei risultati da 1 a 6 su 6

Discussione: popup centrata

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    829

    popup centrata

    Cerco una popup che si apra automaticamente all'apertura della home page e che sia possibilmente centrata rispetto a quest'ultima.Grazie

  2. #2
    Utente di HTML.it
    Registrato dal
    Apr 2000
    Messaggi
    938
    Ciao


    Popuop centrata nel frame o pagina che contiene il JS



    <script language="JavaScript">
    <!--
    function centra(url, width, height) {
    if (document.all) {
    var x = window.screenLeft;
    var y = window.screenTop;
    var w = window.document.body.offsetWidth;
    var h = window.document.body.offsetHeight;
    }
    else {
    var x = window.screenX;
    var y = window.screenY;
    var w = window.outerWidth;
    var h = window.outerHeight;
    }
    var cntx = x + Math.round((w - width) / 2);
    var cnty = y + Math.round((h - height) / 2);
    window.open (url, null, 'left=' + cntx + ',top=' + cnty + ',width=' +
    width + ',height=' + height +',scrollbars=1');
    }
    //-->
    </script>
    LINK




    Centrata rispetto allo chermo:



    <script language="JavaScript">
    <!--
    function centra(url, width, height) {
    var cntx = (screen.width - width) / 2;
    var cnty = (screen.height - height) / 2;
    window.open(url, 'null', 'left=' + cntx + ',top=' + cnty + ',width=' + width + ',height=' + height +',scrollbars=1');
    }
    //-->
    </script>

    LINK



    Massimo

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    829
    Grazie ma la popup che cerco deve aprirsi automaticamente all'apertura della homepage!

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    829

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    829
    Proprio nessuno sa fornirmi di questa popup?

  6. #6
    Utente di HTML.it
    Registrato dal
    Apr 2000
    Messaggi
    938
    Ciao



    <script language="JavaScript">
    <!--
    function centra(url, width, height) {
    if (document.all) {
    var x = window.screenLeft;
    var y = window.screenTop;
    var w = window.document.body.offsetWidth;
    var h = window.document.body.offsetHeight;
    }
    else {
    var x = window.screenX;
    var y = window.screenY;
    var w = window.outerWidth;
    var h = window.outerHeight;
    }
    var cntx = x + Math.round((w - width) / 2);
    var cnty = y + Math.round((h - height) / 2);
    window.open (url, null, 'left=' + cntx + ',top=' + cnty + ',width=' +
    width + ',height=' + height +',scrollbars=1');
    }
    //-->
    </script>
    <body onload="centra('http://www.libero.it/','200','200')">




    Centrata rispetto allo chermo:



    <script language="JavaScript">
    <!--
    function centra(url, width, height) {
    var cntx = (screen.width - width) / 2;
    var cnty = (screen.height - height) / 2;
    window.open(url, 'null', 'left=' + cntx + ',top=' + cnty + ',width=' + width + ',height=' + height +',scrollbars=1');
    }
    //-->
    </script>

    <body onload="centra('http://www.libero.it/','200','200')">







    Massimo

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.