Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> czemu dziala tylko pod IE
swist666
post
Post #1





Grupa: Zarejestrowani
Postów: 152
Pomógł: 1
Dołączył: 14.05.2004
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


czemu ten kod działa tylko pod ie ?

Kod
<table width="650">

<tr>

<td style="cursor:hand;" onmouseover="javascript:this.background='./gfx/b.gif';" onmouseout="javascript:this.background='';" onclick="javascript:location.href='/oferta.php?str=gal';">



<a href="/oferta.php?str=gal" style="color:#000000;text-decoration : none;">Przykładowe pojazdy - galeria</a>



</td></tr></table>


chodzi o to żeby po najechaniu na pole tabeli ( <td></td> ) zmieniało kolor ( background lub bgcolor )
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 8)
Bakus
post
Post #2


Administrator serwera


Grupa: Przyjaciele php.pl
Postów: 909
Pomógł: 0
Dołączył: 12.08.2003
Skąd: /var/www/wroclaw.php

Ostrzeżenie: (0%)
-----


[xml:1:2f32526dc4]<td style="cursor:hand;" onmouseover="this.background='./gfx/b.gif';" onmouseout="this.background='';" onclick="location.href='/oferta.php?str=gal';">[/xml:1:2f32526dc4]
W parametrach onmouse..... nie daje się "java script:"... onmouse..... jest obsługiwane TYLKO przez JS... "java script:" dajesz tylko w href=""
Go to the top of the page
+Quote Post
Vir
post
Post #3





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.02.2004

Ostrzeżenie: (0%)
-----


Sugeruję zrobić tak:
[xml:1:56af3ed29d]<style type="text/css">
.tlo
{
background-image: url('b.gif');
}
</style>[/xml:1:56af3ed29d]
oraz
[xml:1:56af3ed29d]<table width="650">
<tr>
<td style="cursor:hand;" onmouseover="this.className='tlo'" onmouseout="this.className=''" onclick="location.href='/oferta.php?str=gal';">
<a href="/oferta.php?str=gal" style="color:#000000;text-decoration : none;">Przykładowe pojazdy - galeria</a>
</td>
</tr>
</table>[/xml:1:56af3ed29d]
Go to the top of the page
+Quote Post
swist666
post
Post #4





Grupa: Zarejestrowani
Postów: 152
Pomógł: 1
Dołączył: 14.05.2004
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


kod to:

[xml:1:ac0c8a8106]<html>
<head>
<title>costam</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css">
.tlo
{
background-image: url('b.gif');
}
</style>
</head>
<body>

<table width="650">
<tr>
<td style="cursor:hand;" onmouseover="this.className='tlo'" onmouseout="this.className=''" onclick="location.href='/oferta.php?str=gal';">
<a href="/oferta.php?str=gal" style="color:#000000;text-decoration : none;"> Przykładowe pojazdy - galeria </a>
</td>
</tr>
</table>

</body>
</html>
[/xml:1:ac0c8a8106]

ale ten kod nie działa nawet pod IE ;(
Go to the top of the page
+Quote Post
Bakus
post
Post #5


Administrator serwera


Grupa: Przyjaciele php.pl
Postów: 909
Pomógł: 0
Dołączył: 12.08.2003
Skąd: /var/www/wroclaw.php

Ostrzeżenie: (0%)
-----


moje rozwiązanie działa w ie...
Go to the top of the page
+Quote Post
Vir
post
Post #6





Grupa: Zarejestrowani
Postów: 91
Pomógł: 0
Dołączył: 25.02.2004

Ostrzeżenie: (0%)
-----


A ścieżka do pliku graficznego jest prawidłowa (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) :?:
Zauważ, że w Twoim pliku było gfx/b.gif a ja pozwoliłem sobie wyciąć co nieco.
Go to the top of the page
+Quote Post
swist666
post
Post #7





Grupa: Zarejestrowani
Postów: 152
Pomógł: 1
Dołączył: 14.05.2004
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


sorki (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) sciezka byla zla, działa w IE ale w Operze nadal nie działa (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Go to the top of the page
+Quote Post
Paul
post
Post #8





Grupa: Zarejestrowani
Postów: 636
Pomógł: 0
Dołączył: 22.10.2003
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Skopiowalem i przestestowalem twoj kod, ktory napisales 3 posty wyzej... on dziala na IE, Mozilli jak i Operze....

Moze faktycznie masz ten img w innym folderze, bo ja sobie stworzylem i umiescilem tak, jak podana jest sciezka i wszystko bylo ok...
Go to the top of the page
+Quote Post
swist666
post
Post #9





Grupa: Zarejestrowani
Postów: 152
Pomógł: 1
Dołączył: 14.05.2004
Skąd: Wrocław

Ostrzeżenie: (0%)
-----


dziala (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

MEGA THX !
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 19:24