Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Nov 2002
    Messaggi
    388

    script per ridimenzionare livelli

    ho modificato uno script per ridimenzionare un livello in base alla risoluzione ma mi da un errore di: out of memory alla linea 8 (if (navigator.appName=="Microsoft Internet Explorer"){) mi potete aiutare a risolvere il problema?


    ***********************
    function resizeDiv(){
    height = 0;
    width = 0;
    if (navigator.appName=="Microsoft Internet Explorer"){
    height = document.body.clientHeight;
    width = document.body.clientWidth;
    }
    else{
    height = window.innerHeight;
    whidth = window.innerWidth;
    }
    if(navigator.appName=="Microsoft Internet Explorer") {
    document.all.livello.style.height = (height);
    document.all.livello.style.width = (width);
    }
    else{
    document.getElementById("livello").style.height = (height);
    document.getElementById("livello").style.width = (width);
    }

    if (window.screen.height > 600 && window.screen.width > 800){
    resizeDiv(100, 200);
    }
    }

  2. #2
    Utente di HTML.it L'avatar di Sgnafurz
    Registrato dal
    Mar 2003
    Messaggi
    2,182
    hai provato cosi?

    function resizeDiv(){
    height = 0;
    width = 0;
    if (document.all){
    height = document.body.clientHeight;
    width = document.body.clientWidth;
    document.all.livello.style.height = (height);
    document.all.livello.style.width = (width);
    }
    else if(document.getElementById && !document.all){
    height = window.innerHeight;
    whidth = window.innerWidth;
    document.getElementById("livello").style.height = (height);
    document.getElementById("livello").style.width = (width);
    }

    if (window.screen.height > 600 && window.screen.width > 800){
    resizeDiv(100, 200);
    }
    }

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.