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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:53:10+00:00 2026-06-16T17:53:10+00:00

My asp.net page loads with one text box and one button and no hidden

  • 0
  1. My asp.net page loads with one text box and one button and no hidden element at this point.

  2. On button click it does processing and creates number of divs (Panel) based on result. Divs will have result in them as Pass, Fail, Neutral, etc. This happens by asp.net asynchronous web service call without any page refresh

  3. Now after the divs are created I want to analyze the content of these divs using jQuery and add particular attributes to those divs. eg Div Background color as Green for Pass, Amber for Neutral etc. Would do more processing as required in future.

  4. I can do this in asp.net only, but i want to keep the div highlighting thing separate from asp.net code and jquery will be more suitable for that.

  5. (Question) Any suggestion how to trigger the jquery method after those divs are created on the webpage.

Edit 1: I am trying this, but not working.

$(document).on("create", '[id*="GridComp"]', function () { 
    alert("Created 1");
    // change background color of divs or any other thing
});
  • 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-06-16T17:53:12+00:00Added an answer on June 16, 2026 at 5:53 pm

    If those divs Id attribute contains “GridComp”. Then you can use setInterval method and keep checking the existence of divs. If found then style those divs as per the contained text and clear interval.

    var intervalId;
    $(function(){
        intervalId = setInterval(styleDynamicDivs, 500);
    });
    
    function styleDynamicDivs(){
    
        if($('div[id*="GridComp"]').length > 0){
            clearInterval(intervalId);
    
            $('div[id*="GridComp"]').each(function(){
                var result = $.trim($(this).text().toLowerCase());
                if(result == "pass"){
                    $(this).css('background-color', 'Green');
                }
                else
                {
                    $(this).css('background-color', 'red');
                }
            });
        }
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've one asp.net page and I want to load text into the textArea control
I'm creating an asp.net page that uses the google map api. The page loads
I would like to open a document after my ASP.NET page loads in a
I am working on a GridView in Asp.Net. When initially a the Page Loads,
In this asp.net page, there is a link that leads to another page in
I have two web pages: one consists of four asp.net text boxes and one
I have an ASP.Net MVC Page with a very simple form on it: One
I have a this asp.net page which upon first time load: 1: Make a
I am attempting to fill in an ASP.NET page textbox with some predefined text
I have a Grid in an ASP.NET page and I have an Export button.

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.