![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 66 Pomógł: 0 Dołączył: 4.05.2007 Ostrzeżenie: (0%) ![]() ![]() |
Mam Funkcję:
Kod var content=new Array() content[0]='cos' content[1]='cos2' content[2]='cos3' function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ appear() setTimeout("window.onresize=regenerate",450) } } function changetext(co, whichcontent){ if (document.all||document.getElementById){ cross_el=document.getElementById? document.getElementById("co"):document.all.co cross_el.innerHTML='<font color="black">'+whichcontent+'</span>' } else if (document.layers){ document.d1.document.d2.document.write('<font color="black">'+whichcontent+'</span>') document.d1.document.d2.document.close() } } function appear(){ document.d1.visibility='show' } window.onload=regenerate2 I nie wiem czemu nie chce działać :/ a oto przykład wywołania: Kod <table width="449" border="1" bordercolor="#000000" cellspacing="0" cellpadding="0" align="center">
<tr> <td width="50%"> <div id="scriptmenu" style="line-height:20px"> <P align="center" onMouseover="changetext(descriptions1, content[0]);">cosik tam</P> <P align="center" onMouseover="changetext(descriptions1, content[1]);">cosik tam2</P> <P align="center" onMouseover="changetext(descriptions1, content[2]);">cosik tam3</P> </div> </td> <td width="50%" valign="middle" align="center"> <div id="descriptions1"> </div> Ten post edytował Max1992 28.09.2007, 13:37:32 |
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 1 165 Pomógł: 9 Dołączył: 9.04.2002 Skąd: Toruń Ostrzeżenie: (0%) ![]() ![]() |
Spróbuj tak:
Łukasz -------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 66 Pomógł: 0 Dołączył: 4.05.2007 Ostrzeżenie: (0%) ![]() ![]() |
niestety nie pomogło :/
|
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 300 Pomógł: 1 Dołączył: 22.09.2003 Skąd: Czeladź Ostrzeżenie: (0%) ![]() ![]() |
http://www.w3schools.com/css/pr_class_visibility.asp
ps: nawet w javascripcie dobrym zwyczajem jest używanie średników na końcu poleceń -------------------- |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 66 Pomógł: 0 Dołączył: 4.05.2007 Ostrzeżenie: (0%) ![]() ![]() |
niestety też nic :/
ale mam też coś takiego Kod function changetext(whichcontent){ if (document.all||document.getElementById){ cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions cross_el.innerHTML='<font color="black">'+whichcontent+'</span>' } else if (document.layers){ document.d1.document.d2.document.write('<font color="black">'+whichcontent+'</span>') document.d1.document.d2.document.close() } } i to działa tylko że chciał bym aby wyświetlało w więcej niż jednym oknie ![]() description oznacza miejsce pokazania treści Edit: To jest orginalny kod: Kod <script>
<!-- var content=new Array() content[0]='<p align=center>To jest przykładowy tekst 1</p>' content[1]='<p align=center>To jest przykładowy tekst 2</p>' content[2]='<p align=center>To jest przykładowy tekst 3</p>' content[3]='<p align=center>To jest przykładowy tekst 4</p>' function regenerate(){ window.location.reload() } function regenerate2(){ if (document.layers){ appear() setTimeout("window.onresize=regenerate",450) } } function changetext(whichcontent){ if (document.all||document.getElementById){ cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions cross_el.innerHTML='<font color="black">'+whichcontent+'</span>' } else if (document.layers){ document.d1.document.d2.document.write('<font color="black">'+whichcontent+'</span>') document.d1.document.d2.document.close() } } function appear(){ document.d1.visibility='show' } window.onload=regenerate2 </script> <title>Java</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> <META NAME="konwerter" CONTENT="Ogonki97 1.3"> <link rel="stylesheet" href="../style.css" type="text/css"> </head> <body bgcolor="#408cc0" text="#000000"> <table width="449" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> <td width="120" height="20" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="zama"> <tr> <td width="120" height="20" background="../grafa/menu.gif" valign="middle" align="center">Java</td> </tr> </table> </td> <td width="329"></td> </tr> <tr> <td height="2"></td> <td></td> </tr> <tr> <td height="349" colspan="2" valign="top"> <table width="100%" border="0" cellpadding="5" cellspacing="0" class="zama"> <tr> <td width="449" height="349" background="../grafa/tlo.gif" valign="top" align="center"> <table border="1" width="100%" bordercolor="#000000" cellspacing="0" cellpadding="0"> <tr> <td width="50%"> <div id="scriptmenu" style="line-height:20px"> <P align="center"><a href="jakis link" onMouseover="changetext(content[0])">To jest przykładowy link 1</a></P> <P align="center"><a href="jakis link" onMouseover="changetext(content[1])">To jest przykładowy link 2</a></P> <P align="center"><a href="jakis link" onMouseover="changetext(content[2])">To jest przykładowy link 3</a></P> <P align="center"><a href="jakis link" onMouseover="changetext(content[3])">To jest przykładowy link 4</a></P> </div> </td> <td width="50%" valign="middle" align="center"> <ilayer id="d1" width="200" height="200" visibility="hide"> <layer id="d2" width="200" height="200"> <div id="descriptions"> </div> </layer> </ilayer> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> Ten post edytował Max1992 28.09.2007, 15:02:16 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 19.07.2025 - 15:05 |