reload a div after submitting a form
<p>i have code like this. which is actually a form .which lets user updates his ratings . once  he clicks on update or save . i do a ajax and save his ratings and give him the success message. but how can i refresh this div to show his new ratings  and i need to block update / save for this user for next 2 mins .how do i do it ? i use jquery framework</p>

<p>$myresult .= '';</p>

<pre><code>$myresult .= '&lt;form name =\'form1\' id=\'form1\' method = \'POST\' action=\''.$_SERVER['php_self'] .'\'&gt;';


/* actual rating table - start - actual rate/update */

$myresult .= '&lt;table id=\'rounded-corner\'&gt;';

/* thead - start */
$myresult .= '&lt;thead&gt;';

$myresult .= '&lt;tr&gt;';

$myresult .= '&lt;th width=\'30%\' class=\'rounded-company\' scope=\'col\'&gt;&lt;span style=\'font: normal 18px  Arial, Helvetica, sans-serif; color:#FFF;\'&gt;Ratings&lt;/span&gt;&lt;/th&gt;';

$myresult .= '&lt;th width=\'70%\' colspan=\'2\'class=\'rounded-q4\' scope=\'col\'&gt;&lt;/th&gt;';

$myresult .= '&lt;/tr&gt;';
$myresult .= '&lt;/thead&gt;';

/* thead - end */

/* tbody - start */
$myresult .= '&lt;tbody&gt;';
unset($i);
/*start printing the table wth feature and ratings */
for ($i = 1 ; $i &lt; $numProperties; $i++){

if($master_rating_properties['rating'.$i.'_name']){

$myresult .= '&lt;tr&gt;';

/*fetch ratings and comments - 1st make it to null */
$indfeature = 0;
$comment    = '';

$indfeature = $user_ratings['rating'.$i];
if($indfeature == NULL){ $indfeature = 0; }
$comment    = $user_ratings['rating'.$i.'_comment']; 


$myresult .= '&lt;td width=\'22%\'&gt;';

$myresult .= $master_rating_properties['rating'.$i.'_name'].' ( '.$indfeature.' )';

$myresult .= '&lt;/td&gt;';

$myresult .= '&lt;td colspan=\'0\' width=\'38%\' &gt;';

if(($userId != '0') &amp;&amp; (is_array($user_ratings)))
{
$tocheck = $indfeature;
}
else
{
$tocheck = '0';
}

for($k = 0.5; $k &lt;= 10.0; $k+=0.5){

$tocheck = roundOff($tocheck);
if(($tocheck) == $k)
{ $chk = "checked"; }

else

{ $chk = ""; }

$myresult .= '&lt;input class=\'star {split:2}\' type=\'radio\' name=\'rating'.$i.'\' id=\'rating'.$i.''.$k.'\' value=\''. $k .'\'  '.$chk.'  title=\''. $k.' out of 10 \' '.$disabled.' \' /&gt;';

}

/* for k loop end */
$myresult .= '&lt;/td&gt;';
$myresult .= '&lt;td width=\'40%\'&gt;';
$myresult .= '&lt;input title=\'Reason for this Rating.. \'type=\'text\' size=\'25\' name=\'comment'.$i.'\' id=\'comment'.$i.'\' style=\'display:;\' maxlength=\'255\' value="'.$comment.'"&gt;';
$myresult .= '&lt;/td&gt;';
$myresult .= '&lt;/tr&gt;';
}
/* end if loop */
}
/* end i for loop */

$myresult .= '&lt;/tbody&gt;';
/* end tbody */    

/* footer round corner start */
$myresult .= '&lt;tfoot&gt;';
$myresult .= '&lt;tr&gt;';
$myresult .= '&lt;td class=\'rounded-foot-left\'&gt;&amp;nbsp;&lt;/td&gt;';

$myresult .= '&lt;td class=\'rounded-foot-right\' colspan=\'4\' &gt;';

if(($userId != '0') &amp;&amp; (is_array($user_ratings)))
{
$myresult .= '&lt;input type=\'button\' id=\'update_form\' value=\'Update\'&gt;';
}
else
{
$myresult .= '&lt;input type=\'button\' id=\'save_form\' value=\'Save\'&gt;';
}

$myresult .= '&lt;/td&gt;';
$myresult .= '&lt;/tr&gt;';
$myresult .= '&lt;/tfoot&gt;';

$myresult .= '&lt;/table&gt;';
/*round corner table end */

$myresult .= '&lt;/form&gt;';
/*end the form to take ratings */ 
$myresult .= '&lt;/div&gt;';
/*end 2nd tab */
</code></pre>
