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 863461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:18:52+00:00 2026-05-15T09:18:52+00:00

I have a jQuery-Script to accomplish the following tasks: if a gridview in my

  • 0

I have a jQuery-Script to accomplish the following tasks:

  • if a gridview in my form contains a row with a certain id, it has to be
    marked red.
  • a confirm dialogue has to pop up to ask the user if he wants to do this or that.

I built this code:

if (response == "EntryInList") {               
            $('#entryListContainer div table tbody tr').each(function() {                  
                if ($(this).attr('id') == 'entry_' + $('#<%= txtProductNumber.ClientID  %>').val()) {
                     $(this).css("color", "red");
                }
            }
            );

            if (!confirm("Entry already exists. Really overwrite?")) {
                jQuery('#<%= txtProductNumber.ClientID  %>').val('');
                jQuery('#<%= txtCount.ClientID  %>').val('');
                jQuery('#<%= txtProductNumber.ClientID  %>').focus();
                return false;
            }
        }

As a result, the confirm box pops up first, without the row being turned red. Only after
using the box, it becomes red. How would I get the row to be turned red at once?

Another of my problems is that the confirm box denies my page to be scrolled down. But
I would like to do this if the gridview is longer than the entire page.

  • 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-15T09:18:53+00:00Added an answer on May 15, 2026 at 9:18 am

    The display will not update until your JavaScript code finishes executing and the confirm dialog is modal, which will halt all scripts until the dialog is closed. This means you won’t see any changes to the document until after the box is closed, even though those changes have taken place.

    A viable solution might be to display the box using setTimeout(function () {}, 0), but you might have to rework your other code a bit.

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

Sidebar

Related Questions

I have the following jQuery function embedded in an MVC Razor page: <script type=text/javascript>
I have a jQuery script: $.ajax({ url: /scripts/secure/development/ajax.asp, type: POST, dataType: text, data: cmd=addresses,
I have this jquery script which suppose to hide/show div element base on the
I have this jQuery script var dataString = class_id=+class_id; $.ajax({ type: POST, url: page.php,
I have a jQuery search script that uses tabs for the user to define
I have a JS/jQuery script that adds our leads (web contacts) to the DOM
On my website www.staygold-design.com I have a fancybox jquery script on a button under
I have a very simple jQuery script.. all I want it to do is
I have created a simple JQuery script with hovering effect on some links. The
I have this at the top of my jQuery script: $().ajaxStart(function() { alert('ok'); });

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.