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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:26:29+00:00 2026-06-02T03:26:29+00:00

I have a web application that creates a graph on another aspx page. Sometimes

  • 0

I have a web application that creates a graph on another aspx page. Sometimes the graph cannot be created to specification because there is an error in the user specification (such as a string where an integer was expected).

I would like to immediately pop up an alert window telling them that something went wrong when I was trying to render the graph.

The thing is, I don’t know how to immediately check to see if I should insert a script for an alert window. Once my code on “chart.aspx”(image URL) is executed, I don’t know how to immediately check if anything went wrong from the main page. I know it happened in the code in chart.aspx, but other than not to not render the image or render a different image, I don’t know how to tell the user before another postback. I would really like to see if there is any sort or event or stage in the page lifecycle after one of the images is rendered.

If this is not possible, how can I chart.aspx convey an error message to default.aspx if it is simply an image. Maybe some sort of Response.Write(…?)

Thanks again guys.

  • 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-02T03:26:30+00:00Added an answer on June 2, 2026 at 3:26 am

    Maybe you could try monitoring the image’s load events and handle onabort and onerror via javascript?

    http://www.w3schools.com/jsref/dom_obj_image.asp

    Image Object Events

    Event      The event occurs when...  
    onabort    Loading of an image is interrupted
    onerror    An error occurs when loading an image
    onload     An image is finished loading
    

    The old school way of doing this would be to render your image tag like below:

    <img src="chart.aspx" onerror="alert('Image failed to load because XYZ.');" />
    

    Nowadays, I’d recommend you use jquery, something like this:

    <img src="placeholder.gif" class="chart" alt="chart">
    
    <script type="text/javascript">
        jQuery(function($) {
            var img = $(document.createElement('img'));
            img.on('error', function() { alert ('...'); });
            img.on('load', function() { $('img.chart').attr('src', img[0].src); });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today we have a windows application that, using an OCX, creates a web page
I have a web application that dynamically creates a web page using usercontrols. Within
i have created an mvc3 web application that uses forms based authentication. one part
We have created a web application, using ASP.NET, that allows users to upload documents
I have created a timeclock application in C# that connects to a web service
I have a web application that creates directories. The application works fine when creating
I have a unique issue - I am designing a web application that creates
We already have build scripts that creates our web application folders very nicely. We
I have a visualization web application (small project) that creates charts and graphs from
In my program, I have a web application that creates a PNG image. This

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.