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

Related Questions

I have a code like this below, which gives me a $link that equals
I have a code like this, which is solved by me following a exercise
i have a code which is like this : private void testToolStripMenuItem_Click(object sender, EventArgs
I have code which needs to do something like this There is a list
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have some Java code which looks roughly like this: String urlString = ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1.glo_30m.dp.200601.grb2;
I have lot of code in my Tornado app which looks like this: @tornado.web.asynchronous
I'm training code problems like UvA and I have this one in which I
I have a form on which I would like the user to confirm one
I have code like this in my view model: function ChatListViewModel(chats) { var self

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.