Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    clientHeight...non funziona

    Ciao,
    non avendo il corrispettivo della funzione window.innerHeight (funzionante in mozilla) in internet explorer ho fatto una ricerca ed ho trovato questo matedo:
    document.body.clientHeight
    Mi ritorna sempre zero!?!
    Esiste un modo per sapere l'altezza della finestra?
    http://www.beavermag.it

  2. #2

    oggi mi sento buono....

    codice:
    this.getLarghezzaEsterna = function() {
    	if(typeof(this.outerWidth)!="undefined") {
    		return this.outerWidth;
    	}
    	else if(typeof(this.document.body.offsetWidth)!="undefined") {
    		var bodyW1 = this.document.body.offsetWidth;
    		var bodyH1 = this.document.body.offsetHeight;
    		this.resizeTo(bodyW1,bodyH1);
    		var offsetW= bodyW1-this.document.body.offsetWidth;
    		var offsetH= bodyH1-this.document.body.offsetHeight;
    		this.resizeTo(offsetW+bodyW1, offsetH+bodyH1);
    		return offsetW+bodyW1;
    	}
    }
    
    this.getAltezzaEsterna = function() {
    	if(typeof(this.outerHeight)!="undefined") {
    		return this.outerHeight;
    	}
    	else if(typeof(this.document.body.offsetHeight)!="undefined") {
    		var bodyW1 = this.document.body.offsetWidth;
    		var bodyH1 = this.document.body.offsetHeight;
    		this.resizeTo(bodyW1,bodyH1);
    		var offsetW= bodyW1-this.document.body.offsetWidth;
    		var offsetH= bodyH1-this.document.body.offsetHeight;
    		this.resizeTo(offsetW+bodyW1, offsetH+bodyH1);
    		return offsetH+bodyH1;
    	}
    }
    la richiami con
    top.getAltezzaEsterna(); oppure
    self.get....
    window.get...
    parent.get...
    etc
    «Se leggi dimentichi, se vedi capisci, se fai impari» Piaget

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.