Dobrý den, udělal jsem si web u sebe na localhostu, přesunul jsem web na domenu a když se kouknu na web tak JS nefunguje tak jak na localhostu. Ale když je tam chyba s db tak JS funguje normálně, jsem už z toho opravdu "jelen". Prosím nevíte čím to může být? Děkuji
Fórum › JavaScript, AJAX, jQuery
DIvná chyba

A co napsat třeba trochu víc? Chyba může bejt kdekoliv.
Jedná se o měnící se menu podle toho na jaký text ukážu, blbne to s posledníma příspěvkama z fora, když tam není nebo je dobře všechno zadano (server,pass,user,port,db) tak se to podmenu který se má ukázat (jako pozadí má obrázek který se mění) neukáže a všechno je v bodech (<li>), ale jakmile zadam třeba špatnou db tak to jede v pohodě
takže tady je obrázek když je špatná db a nebo to je na localhostu:
,
a tady když je dobře vyplněná db nebo tam nejsou poslední příspěvky:
kod na poslední příspěvky zde:
<div id="menu_forum">
<?php
$dbServer2 = "xxx";
$dbUser2 = "xxx";
$dbPassword2 = "xxx";
$dbName2 = "xxx";
$link2 = mysql_connect ($dbServer2,$dbUser2,$dbPassword2)
or die ("Spojenie neúspešné.");
$db_4=mysql_select_db($dbName2, $link2)
or die ("Nepodarilo sa otvoriť databázu.");
$query1="SET NAMES 'utf8'";
$query="SELECT * FROM tema ORDER BY datum DESC LIMIT 5";
$result_tema = mysql_query($query1, $link2);
$result_tema = mysql_query($query, $link2)
or die ("Spojenie s databázou bolo neúspešné");
echo "<h3><font color='black'>Co na se píše na fóru?</font></h3>";
echo "<h3><font color='black'>Poslední založené fórum téma</font></h3>";
echo "<div class='forum_prispevky'>
<font class='menu_forum_rospis_1'>Název tématu</font>
<font class='menu_forum_rospis_2'>Založil</font></div>";
echo "<table>";
while ($row=mysql_fetch_array($result_tema))
{
echo "<tr>
<td class='forum_prispevky'><h3>",$row['nazev'],"</h3></td>
<td class='forum_prispevky'> ",$row['zalozil'],"</td></tr>";
}
echo "</table>";
echo "<h3><font color='black'>Poslední Fórum příspěvky</font></h3>";
echo "
<div class='forum_prispevky'><font class='menu_forum_rospis_1'>Název tématu</font>
<font class='menu_forum_rospis_2'>Odpověděl</font></div>
<table>
<tr><td class='menu_forum_stred'></td></tr>
";
echo "
</table>
<table>
";
$query2="SELECT * FROM odpoved ORDER BY datum DESC LIMIT 5";
$result_odpoved = mysql_query($query1, $link2);
$result_odpoved = mysql_query($query2, $link2)
or die ("Spojenie s databázou bolo neúspešné");
while ($row2=mysql_fetch_array($result_odpoved))
{
$tema=$row2['tema'];
echo "
<tr><td class='forum_prispevky'><h3>",$tema,"</h3></td>
<td class='forum_prispevky'> ",$row2['odpovedel'],"</td></tr>";
}
echo "</table>";
?>
</div>
EDIT: tak jsem zjistil že u IE8 to funguje normálně na domeně, u chrome,firefoxu nějak ne :(
EDIT: Vyřešeno

Přidej příspěvek
Toto téma je starší jak čtvrt roku – přidej svůj příspěvek jen tehdy, máš-li k tématu opravdu co říct!
Ano, opravdu chci reagovat → zobrazí formulář pro přidání příspěvku
×Vložení zdrojáku
×Vložení obrázku
×Vložení videa
Aktuálně jsou podporována videa ze serverů YouTube, Vimeo a Dailymotion.
×






























































Uživatelé prohlížející si toto vlákno
Uživatelé on-line: 0 registrovaných, 12 hostů
Podobná vlákna
Divná chyba Python 2.7 — založil PiKey
Divna nahoda — založil Earl Cash
Chyba - začátek, hned chyba — založil Levin
Moderátoři diskuze