javascript - Modal Windows and Div Refresh -
i have problem prototype.js modals , function <div>
refresh.
i try create modals clicking on link in top menu. when modal function executes, <div>
elements disappear.
why happen?
$(document).ready(function() { $("#presenti").load("presenti.php"); var refreshid = setinterval(function() { $("#presenti").load('presenti.php?randval=' + math.random()); }, 5000); }); $(document).ready(function() { $("#sms").load("message.php"); var refreshid = setinterval(function() { $("#sms").load('message.php?randval=' + math.random()); }, 10000); }); $(document).ready(function() { $("#lallero"); var refreshid = setinterval(function() { $("#lallero").load(location.href + " #lallero"); }, 3000); });
whole html
<html>
0) { echo "(".$nonletti .") teen wolf gdr";} else { echo "teen wolf gdr"; }?>
<table width="100%" height="100%" cellpadding=0 cellspacing=0> <!-- colonna sinistra!--> <td style="background-image:url('image/main/pattern_colonna.png');" valign="top"> <table cellpadding=0 cellspacing=0> <tr> <td width="214" height="220" style="background-image:url('img/luoghi/<?= $immagine ?>');background-repeat:no-repeat;border-bottom:0px solid #0b0b0b;"> <div id="info_loc"> <a href="javascript: void(0)" onclick="javascript:window.open('guarda.php?id=<?= $_session['stanza'] ?>','look','height=600,width=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes')"> <img src="image/main/cornice_loc.png" width="214" height="220" class="img_ombra"> </a> </div> </td> </tr> <tr> <td style="height:59px;position: absolute;"> <a href="javascript: void(0)" onclick="javascript:window.open('documentazione.html','doc','height=620,width=840,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes' )"> <img src="image/main/doc3.png" class="fade" > </a> </td> </tr> <tr> <? if ((strpos($_server['http_user_agent'], 'msie') !== false) or (strpos($_server['http_user_agent'], 'trident') !== false) or (strpos($_server['http_user_agent'], 'chrome') !== false) or (strpos($_server['http_user_agent'], 'opera mini') !== false) or (strpos($_server['http_user_agent'], 'opera') !== false) or (strpos($_server['http_user_agent'], 'safari') !== false)) { ?> <td style="height:69px;position: absolute; top:279px;"> <? } elseif (strpos($_server['http_user_agent'], 'firefox') !== false) { ?> <td style="height:69px;position: absolute; top:283px;"><? } ?> <span id="sms" ></span> </td> </tr> <? $mynoti = mysql_query("select * agenda data >= now() , data <= date(now() + interval 1 day) , creatore = '$login'"); $row = mysql_fetch_array($mynoti); if ($row['evento'] != '') { $testolozzo = "lo staff ti ricorda che in data <b>".($row['data'])."</b> avrà luogo l'evento <b>".$row['descrizione']."</b> da te salvato in agenda. <u>ulteriori dettagli</u>: ".$row['evento'].""; $testolozzo = mysql_real_escape_string($testolozzo); ?> <tr><td style="position: absolute; top:342px; left: 25px" align=center width="180px"><div style="margin:0px auto; padding-top:0px;border:1px solid #1a1a1a;"><a href="messaggioagenda.php" target=palestra><img src="image/main/promemoriaagenda.gif" dynsrc="image/main/promemoriaagenda.gif" loop=infinite></a></div></td></tr> <? } ?> <tr> <td align=center> <div id="presenti"> </div> </td> </tr>
</td> <!-- colonna centrale /frame !--> <td style="width:100%;background-image:url('image/main/pattern_colonna.png');" valign=top align=center> <div id="lallero"><?php include ('refreshable.php'); ?></div> <table style="width:100%;height:95%;" cellpadding=0 cellspacing=0> <tr><td> <!-- qui va l'iframe !--> <? if ($situazione != "") { ?><div id="news2"><iframe src="situazionechat.php" width="100%" height="100%" frameborder="no" scrolling="no" ></iframe></div> <iframe width="100%" height="94%" src="<?= $link ?>" frameborder="no" name="palestra"></iframe><? } else { ?> <iframe width="100%" height="100%" src="<?= $link ?>" frameborder="no" name="palestra"></iframe><? } ?> </td></tr> </table> </td> <!-- colonna destra!--> <td style="background-image:url('image/main/pattern_colonna.png');" valign="top"> <table width="200" cellpadding=0 cellspacing=0> <tr> <?php $mini = mysql_fetch_array(mysql_query("select mini_avatar personaggio nome = '".$_session['login']."'")); ?> <td width="150" height="150" style="background-size: 150px 150px; background-position: center; background-image:url('<?= $mini['mini_avatar'] ?>');background-repeat:no-repeat;border-bottom:0px solid #0b0b0b;"> <div id="mini_avatar"> <a href="javascript: void(0)" onclick="javascript:window.open('scheda.php?pg=<?= $login ?>','look','height=650,width=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes')"><img src="image/main/cornice_miniavatar.png" style="margin-left: 24px; margin-top: -2px; width: 152px; height: 152px;"></a> </div> </td> </tr> </table> <table width="150" height="15px" cellpadding=0 cellspacing=0 align=center><tr><td align=right> <? if ($pg['dispo'] == '0') { echo "<font famili=verdana color=#707070 size=2px>disponibilità attuale:</font> <img src='image/presenti/pallaverde.png' widht=12px height=12px>"; } if ($pg['dispo'] == '1') { echo "<font famili=verdana color=#707070 size=2px>disponibilità attuale:</font> <img src='image/presenti/pallarossa.png' widht=12px height=12px>"; } if ($pg['dispo'] == '2') { echo "<font famili=verdana color=#707070 size=2px>disponibilità attuale:</font> <img src='image/presenti/pallagialla.png' widht=12px height=12px>"; } if ($pg['dispo'] == '3') { echo "<font famili=verdana color=#707070 size=2px>disponibilità attuale:</font> <img src='image/presenti/pallablu.png' widht=12px height=12px>"; } if ($pg['dispo'] == '4') { echo "<font famili=verdana color=#707070 size=2px>disponibilità attuale:</font> <img src='image/presenti/pallaarancio.png' widht=12px height=12px>"; } if ($pg['dispo'] == '5') { echo "<font famili=verdana color=#707070 size=2px>disponibilità attuale:</font> <img src='image/presenti/pallaviola.png' widht=12px height=12px>"; } ?> </td></tr></table> <table width="200" style="margin-top:20px" height="25" cellpadding=0 cellspacing=0> <tr> <td align=center> <div id="tarallo"> <a href="javascript: void(0)" onclick="javascript:window.open('lotteria1.php','lottery','height=650,width=700,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes')" class="menu_top"> <img src="image/main/lotteria.png"/> </a> </div> </td> </tr> <tr> <td align=center> <div id="tarallo"> <a href="javascript: void(0)" onclick="javascript:window.open('calendar/index.php','calendar','height=400,width=500,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes')" class="menu_top"> <img src="image/main/calendario.png"/> </a> </div> </td> </tr> <tr> <td align=center> <div id="tarallo"> <a href="main.php?dir=77#" target="_top" class="menu_top"> <img src="image/main/accoglienza.png"/> </a> </div> </td> </tr> <tr> <td align=center valign="top"> <div id="tarallo"><a href="logout.php" onclick="return conferma();"target="_top" class="menu_top" name="exit" method=post> <img src="image/main/exit.png" class="tarallo" width=150 height=21 ></a> </div> </td> </tr> <tr> <td colspan="3" align="center"> <div id="meteo"><? if ($zonetta =='0') { ?> <? include('meteo.php');?> <? } elseif ($zonetta =='1') { ?><? include('meteot.php');?><? } ?> </div> </td> </tr> </table> <? $musica=mysql_query("select * personaggio nome='$login'"); $s=mysql_fetch_array($musica); if (($musica != "")&&($s['musicachat']==0)) { ?> <table width="200" style="margin-top:5px" cellpadding=0 cellspacing=0> <tr> <td align=center valign=bottom><div style="background-image:url('/image/main/pattern_riquadri.png');margin:0px auto; padding-top:0px;border:1px solid #000; width:160px; height:20px;margin-top:5px;"> <iframe src="musicachat.php" width="152" height="20" frameborder="no" scrolling="no" frameborder="1"></iframe> </div></td> </tr> <tr> <td align=center> <div style="background-image:url('/image/main/pattern_riquadri.png');margin:0px auto; padding-top:0px;border:1px solid #000; width:160px; height:210px;margin-top:10px;"> <iframe src="scroll_news.php" width="160" height="210" frameborder="no" scrolling="no" ></iframe> </div> </td> </tr> </table><? } else { ?> <table width="200" style="margin-top:5px" cellpadding=0 cellspacing=0> <tr> <td align=center> <div id="news" > <iframe src="scroll_news.php" width="160" height="225" frameborder="no" scrolling="no" ></iframe> </div> </td> </tr> </table> <? } ?> <table width="200" cellpadding=0 cellspacing=0> <tr> <td align=center valign="bottom" align="right"> </td> </tr> </table> </td> </table>
ok, did it.
i set this:
var $j = jquery.noconflict();
and changed $ in jquery div refresh $j.
thanks everyone! :)
Comments
Post a Comment