javascript - Make menu selection before while loop is done -
i have i=1 5 loop sleep 5 seconds. how can make menu selection , continue page before while loop done. when chose menu item selection take place when while loop done. 30 seconds. have tried put while loop in iframe, , load page, still first load next page when while loop done.
from index page
<link rel="icon" href= (./image/favicon.ico)/> <link rel="stylesheet" href="./db/abcss.css" type="text/css"/> <script type="text/javascript" src="./db/cssnav.js"></script> </head> <body> <div id="wrapper"> <?php include("top.php"); include("indexmenu.php"); ?> <div id="content75"> <div id="h4"> <br/><b><center>velkommen til t</center></b> </div> <div id="h3"><br/><center> text here. </center><br/><br/> <iframe src="./eventrul.php" name = "content_iframe"></iframe> <?php include("bund.php") ?> </body> </html>
from while loop page
if ($info = mysql_fetch_array($data)){ echo "<div id=\"event\">"; while ($info = mysql_fetch_array($data) , $i < 5){ echo "<script>"; echo "document.getelementbyid('event').innerhtml = \"\""; echo "</script>"; echo "<div id=\"event_indhold\">"; if ($info['type']==='andet'){ $info['type'] = $info['typeandet']; } if ($info['emne']==='andet'){ $info['emne'] = $info['emneandet']; } echo "<table><tr><td width = 30% > "." <b>event nummer: </b>"."</td>" . "<td colspan = 10>".$info['arrnr'].", overskrift: ". $info['type']."</td></tr><br/>"; if ($info['arrangoer']!= ""){ echo "<tr><td colspan =10>"." ".$info['arrangoer']."</td> </tr>"; } ob_flush(); flush(); sleep(4); $i++; echo "</div>"; } echo "<script>"; echo "document.getelementbyid('event').innerhtml = \"\""; echo "</script>"; echo "<div id=\"event_indhold\">"; echo '<a href="eventvis.php"><font size="5px">klikke @ se eventlisten </a>'; echo "</div>"; echo "</div>"; }
you put break;
when know want exit loop. break it.
Comments
Post a Comment