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

  • Home
  • SEARCH
  • 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 4344692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:55:59+00:00 2026-05-21T11:55:59+00:00

Currently I have a grid with a bunch of checkboxes – When a checkbox

  • 0

Currently I have a grid with a bunch of checkboxes – When a checkbox is clicked it pops up an alert saying Your Profile has been updated. How would I change this instead of an alert to just having the checkbox change to the ajax circle gif? I realize I could push this to a div with some innerhtml and make it a text alert but I do not know how to remove the div.

Code for checkboxes:

<div id='dropdown<%= proId + entitlements[i].Id.ToString() %>'>
                              <%using (Ajax.BeginForm("UpdateProfileByProfileAdmin", new AjaxOptions { OnBegin = "function(){ ShowProgress(" + proId + entitlements[i].Id.ToString() + ");}", OnComplete = "function(){ HideProgress(" + proId + entitlements[i].Id.ToString() + ");}" }))
                                {
                                    if (reqMode == "Edit")
                                    {%>
                                        <%=Html.CheckBox(proId + entitlements[i].Id.ToString(), profile.PresenceIndicators[i], new { onclick = "CheckEnt('" + proId.ToString() + "', '" + profid.ToString() + "','" + URLUpdateProfile.ToString() + "','" + entitlements[i].Id.ToString() + "','" + softwareId + "')", @class = "riskRank_dd" })%>
                                    <%}
                                    else
                                    {%>
                                        <%=Html.CheckBox(proId + entitlements[i].Id.ToString(), profile.PresenceIndicators[i], new {disabled = true})%>
                                    <% }%>
                                 <input type="submit" value="Go" class="hiddenSubmit" />

AJAX Method:

$.ajax({
                    type: "Post",
                    url: URLUpdateProfile,
                    data: "processProfileId=" + processProfileId + "&enabled=" + value + "&entitlementId=" + entitlementId + "&softwareId=" +softwareId,
                    success: function(affectedRows) {

                        if (affectedRows == "\"0\"") {
                            alert('Unable to update. Please check');
                            $('#' + id).attr('checked', !value);
                        }
                        else if (affectedRows == "\"-2\"") {
                        alert('Profile have no entitlements selected. Please check.');
                            $('#' + id).attr('checked', !value);

                        }
                        else if (affectedRows == "\"1\"" || affectedRows == "\"2\"") {
                            alert('Profile is updated successfully.');
                        }
                        else {
                         alert('The profile is duplicating with' +' '+ affectedRows+'.'+' '+'Please check.')
                         $('#' + id).attr('checked', !value);
                        }
                    }
                });
  • 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-21T11:55:59+00:00Added an answer on May 21, 2026 at 11:55 am

    You’ve done the difficult bit yourself.

    I can give you a general overview.

    Put a checkbox and a div containing the ajax image next to each other. Initially checkbox is displayed, hide the div.

    In each of the callback functions of your ajax request, display the checkbox and div accordingly. You can also use jQuery’s built-in fade/slide methods for even better effect.

    If this doesn’t make sense, let me know. I’ll scribble some code.

    EDIT:

    something like this :

    <div class="checkbox"><%: Html.CheckBoxFor .... %> </div> <div class="ajaxImage" style="display:none"><img src="the image" /> </div>
    

    and inside the CheckEnt() function (which is called when the checkbox is clicked) :

    var theDiv = $(this).parent("div"); //get the parent div which contains the checkbox
    theDiv.hide(); //you can also use .hide(400); to give a good slide out effect
    var theImg = theDiv.next(); //get the ajax image div next to it
    theImg.show();
    $.ajax( { ... //make your ajax call now
    

    and finally in the success function of your ajax call

    theImg.hide();
    theDiv.show(); //show the selected checkbox
    

    I haven’t tested this all but it should work.

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

Sidebar

Related Questions

I currently have a ComponentArt Grid, which has a column containing DateTime values. In
I currently have a table(/grid) of data that I can page, filter and sort.
I currently have an NSView that draws a grid pattern (essentially a guide of
I currently have a client website on the Grid server on MediaTemple that will
I have a grid that is currently using Telerik Grids, I would like to
For class we have a grid and a bunch of squares on the grid
I have a grid of div's (we'll call #entry's). I currently have them where
I currently have a Telerik MVC Grid that is populated with Patients. What I
I currently have a button, which has an icon/image on it. I have configured
I am currently developing an ASP.net c# application. I have a grid view which

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.