Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 821545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:39:29+00:00 2026-05-15T02:39:29+00:00

i have code like this. which is actually a form .which lets user updates

  • 0

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

$myresult .= ”;

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


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

$myresult .= '<table id=\'rounded-corner\'>';

/* thead - start */
$myresult .= '<thead>';

$myresult .= '<tr>';

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

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

$myresult .= '</tr>';
$myresult .= '</thead>';

/* thead - end */

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

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

$myresult .= '<tr>';

/*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 .= '<td width=\'22%\'>';

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

$myresult .= '</td>';

$myresult .= '<td colspan=\'0\' width=\'38%\' >';

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

for($k = 0.5; $k <= 10.0; $k+=0.5){

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

else

{ $chk = ""; }

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

}

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

$myresult .= '</tbody>';
/* end tbody */    

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

$myresult .= '<td class=\'rounded-foot-right\' colspan=\'4\' >';

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

$myresult .= '</td>';
$myresult .= '</tr>';
$myresult .= '</tfoot>';

$myresult .= '</table>';
/*round corner table end */

$myresult .= '</form>';
/*end the form to take ratings */ 
$myresult .= '</div>';
/*end 2nd tab */
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:39:30+00:00Added an answer on May 15, 2026 at 2:39 am

    use jquery post and you can return a JSON data and use the jquery html method to update the component data. it just and idea

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer /cgi-bin/ is a directory where CGI script should be placed.… May 16, 2026 at 11:15 am
  • Editorial Team
    Editorial Team added an answer You could just use the <pre> tag... May 16, 2026 at 11:15 am
  • Editorial Team
    Editorial Team added an answer Swing objects are not thread safe. SwingUtilities.invokeLater() allows a task… May 16, 2026 at 11:15 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a form (let's call it parent form), from which another always on
If I have an Action like this: public ActionResult DoStuff(List<string> stuff) { ... ViewData[stuff]
I use a form where i have listed the data from database like title,
I have a remote server which handles various different commands, one of which is
I have a code engine that plays long WAV files by playing smaller chunks
This is a follow up to a previous question . if I have multiple
I am updating a component via AJAX in JSF: <h:form> <h:outputLink>Click me <f:ajax event=click
I have a bunch of Python modules I want to clean up, reorganize and
I have a SQL Server 2008 procedure that sends email via sp_send_dbmail. I'm using
I'm parsing strings that could have any number of quoted strings inside them (I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.