Autor Zpráva
Verča20
Profil *
Ahoj... Chtěla bych na stránkách otevírat odkazy v nových oknech pomocí <a href="#" onClick="window.open('http://www.stranka.html', 'Stránka', 'resizable,status,scrollbars=yes,width=780,height=500,top=20,left=20') ">Odkaz</a>, Bez problémů mi to funguje v Opeře, Firefoxu, ale v IE ne... Poradíte, jak to poupravit aby to šlapalo všude?
souki
Profil
http://www.jakpsatweb.cz/javascript/window.open.html

můžeš ukázat stránku, kde ti to nefunguje?
Verča20
Profil *
http://www.oriflame.kx.cz/katalog.html
Verča20
Profil *
Odkaz "aktuální" u katalogu
peta
Profil
Verča20
IE - JS konzola - radek 39 znak 1 chyba
(dole zluty vykricnik, rozkliknout, zobrazit podrobnosti)

1. !!! Necestina v nazvu JS okna
Pamatuj, to je javascript a pise se tam to, co si muzes dovolit napsat treba do
INPUT name=aaa
nebo
A target="aaa"
Cili:
<a href="#" onclick="window.open('http://www.stranka.html', 'stranka', 'resizable,status,scrollbars=yes,width=780,height=500,top=20,left=20') ">Odkaz</a>

2. Je dobre to osetrit tak, aby se to dalo otevrit i bez JS a soucasne je-li JS, aby se touzilo to.
Cili:
<a href="http://www.stranka.html" target="stranka" onclick="return !window.open('http://www.stranka.html', 'stranka', 'resizable,status,scrollbars=yes,width=780,height=500,top=20,left=20') ">Odkaz</a>

3. pri vice odkazech je dobre pouzit JS funkci
Cili
<script>
function okenko(xThis)
{
return !window.open(xthis.href, xthis.target, 'resizable,status,scrollbars=yes,width=780,height=500,top=20,left=20') ;
}
</script>
<a href="http://www.stranka1.html" target="stranka" onclick="return okenko(this)">Odkaz</a>
<a href="http://www.stranka2.html" target="stranka" onclick="return okenko(this)">Odkaz</a>
Verča20
Profil *
Díky moc, už mi to funguje;-)
peta
Profil
<a href="http://www.oriflame.cz/prod/offers/CurrentBrochureFrontpage.jhtm l" target="stranka" onclick="return !window.open('http://www.oriflame.cz/prod/offers/CurrentBrochureFrontp age.jhtml', 'stranka', 'resizable,status,scrollbars=yes,width=780,height=500,top=20,left=20') ">Aktuální</a>

Take by to slo napsat:

<a href="http://www.oriflame.cz/prod/offers/CurrentBrochureFrontpage.jhtm l" target="stranka" onclick="return !window.open(this.href,this.target, 'resizable,status,scrollbars=yes,width=780,height=500,top=20,left=20') ">Aktuální</a>

Mimochodem, mas tam </</li>
Toto téma je uzamčeno. Odpověď nelze zaslat.

0