0

I have an asp page with a button on it that uses an image handler to show a jpg. Can I disable a button on the page from the image handler base on what image is loaded. for example if c:/x.jpg is loaded, disable the button.

Thanks Charles

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Charles
  • 315
  • 2
  • 9

2 Answers2

1

The image handler will not be able to do anything - an image doesn't contain any scripts that can be executed.

You can check for the image loaded event in javascript and act on the value. See this SO question and answers.

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
0

This is inherently impossible.

The image is loaded with a separate HTTP request that has nothing to do with the page.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964