View source | View content page | Page history | Printable version   

Projects:Alert icon dynamic/Technical Documentation

Change alert icon dynamically - Technical Documentation


The number of alerts is print by a Javascript function, in this function can be added the check for change the alert icon.

function callback() {
  if(parseFloat(strText) == 0 && document.getElementById("alertImage").className.indexOf("Menu_ToolBar_Button_Icon_alertActive") != -1)
  else if(parseFloat(strText) != 0 && document.getElementById("alertImage").className.indexOf("Menu_ToolBar_Button_Icon_alertActive") == -1)


In this file is necessary to create the function to change the alert icon image, the icon is changed by changing the class attribute.

function setAlertIcon(value) {
  if (value==true) changeClass("alertImage", "Menu_ToolBar_Button_Icon_alert", "Menu_ToolBar_Button_Icon_alertActive");
  if (value==false) changeClass("alertImage", "Menu_ToolBar_Button_Icon_alertActive", "Menu_ToolBar_Button_Icon_alert");
  return true;

Retrieved from ""

This page has been accessed 4,001 times. This page was last modified on 8 June 2012, at 05:26. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.