php Page and star rating plugin full rendered only after refresh

bjceljflelh

New Member
I'm using fyneworks jquery star-rating with jQuery mobile and in one page created dynamically with a PHP function everything is working fine. But in another page where the "rating tab" is included in the PHP page, the stars are not rendered until I refresh the page.PAGE <?phpsession_start();if (!session_is_registered('autorizzato')) { echo "<h1>Area riservata, accesso negato.</h1>"; echo "Per effettuare il login clicca <a href='http://stackoverflow.com/questions/15862541/login.php'><font color='blue'>qui</font></a>"; die;}?><!DOCTYPE html><html><head> <title>Title</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script src="http://stackoverflow.com/questions/15862541/jquery-1.8.2.min.js"></script> <script src="http://stackoverflow.com/questions/15862541/jquery.mobile-1.2.0.min.js"></script> <link rel="stylesheet" href="http://stackoverflow.com/questions/15862541/jquery.mobile-1.2.0.min.css" /> <script src='http://stackoverflow.com/questions/15862541/rating/jquery.MetaData.js' type="text/javascript" language="javascript"></script> <script src='http://stackoverflow.com/questions/15862541/rating/jquery.rating.js' type="text/javascript" language="javascript"></script> <link href='http://stackoverflow.com/questions/15862541/rating/jquery.rating.css' type="text/css" rel="stylesheet"/> <script src="http://stackoverflow.com/questions/15862541/logged.js"></script></head><body background="#000000"><div data-role="page" id="lista"> <div data-role="header" data-position="fixed"> <input type="submit" onClick="back()" data-icon="back" class="ui-btn-left" value="http://stackoverflow.com/questions/15862541/Indietro" /> <h1>TITLE</h1> <a href="http://stackoverflow.com/questions/15862541/logout.php" data-icon="gear" class="ui-btn-right">Logout</a> </div> <div data-role="content" data-theme="a"> <form id="save" action="saveComment.php" method="post" data-ajax="false"> <div data-role="fieldcontain"> <label for="textarea">Comment:</label> <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea> </div> <label>Rating:</label> <div data-role="content" > <input data-role="none" name="stars" type="radio" class="star" value="http://stackoverflow.com/questions/15862541/1"/> <input data-role="none" name="stars" type="radio" class="star" value="http://stackoverflow.com/questions/15862541/2"/> <input data-role="none" name="stars" type="radio" class="star" value="http://stackoverflow.com/questions/15862541/3"/> <input data-role="none" name="stars" type="radio" class="star" value="http://stackoverflow.com/questions/15862541/4"/> <input data-role="none" name="stars" type="radio" class="star" value="http://stackoverflow.com/questions/15862541/5"/> </div> <input type="hidden" name="id" value="http://stackoverflow.com/questions/15862541/<?php echo $_GET["id"]; ?>" /> <input type="hidden" name="rating" id="rating" value="http://stackoverflow.com/questions/15862541/1" /> <fieldset id="actions"> <input type="submit" id="submit" value="http://stackoverflow.com/questions/15862541/Invia"> </fieldset> </form> </div></div></body></html>logged.js$(document).load(function () { $('#rt').click(function () { var div = $(this); div.children('input').each(function () { if ($(this).is(':checked')){ $('#rating').attr("value", $(this).val()); } }); }); });I noticed that the page created dynamically by PHP is accessing my database, and takes about 2-3 seconds to display, and everything is rendered. This second page is rendered only after I press F5 and refresh the page.What am I missing?
 
Top