Potrzebowalem skryptu, ktory otwieralby po kliknieciu na thumnail w galerii obrazek w oryginalnych rozmiarach. Wymyslilem cos takiego:
Kod: Zaznacz cały
// Otwieranie setów
<script language="javascript">
function otworz(adres) {
var winl = (screen.width-800)/2;
var wint = (screen.height-600)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
var settings = 'height=' + 600 + ',';
settings += 'width=' + 800 + ',';
settings += 'top=' + wint + ',';
settings += 'left=' + winl + ',';
settings += 'menubar=no,';
settings += 'toolbar=no,';
settings += 'location=no,';
settings += 'scrollbars=yes,';
settings += 'resizable=yes,';
settings += 'status=no';
okno = window.open('about:blank', '', settings);
okno.window.focus();
okno.document.write('(...)');
}
//-->
</script>
Dzialal bez problemu u mnie na localhost (tylko pod IE), ale na innym serwerze pojawia sie blad " 'okno.window' jest pusty lub nie jest obiektem"
Dwa krotkie pytania:
1) o co chodzi? jak usunac blad?
2) co zmienic, zeby skrypt dzialal nie tylko pod IE?
Z gory dzieki!
--------------------------------------------------------------------------------
Zdrówka, Qp3k
