PDA

View Full Version : Alert/Animate a graphic notification because image was changed



ilan.sch
06-01-2014, 12:19 PM
Hi, I have a webpage with images, all the images are .PNG with red icon
Sometimes there is alert, and the icon is changed to be red, the png image is changed and the page is refreshed automatically.

My problem - the icon is changed from green to red, But I would like to alert the user on the changed icons, If there are 40 icons, the user not always aware that one was changed to be in color red. Is there a way to build javascript, that as soon as certain image change its name to "redIcon.png" there will be radar waves or an arrow pointing to this image ?

xelawho
06-01-2014, 05:45 PM
the png image is changed and the page is refreshed automatically.

well, this is almost certainly not true - nothing happens "automatically". Every event is the result of a programmed routine. And I only mention that because the time when your page is refreshing (as a result of some routine that you have coded) would also be the best time to check for a change in the source path of images and do some sort of notification.

The other option would be putting onload listeners onto all of your images. But that would seem to be the clumsy way of doing this.

I think we may need to see some more code.