3 Replies Latest reply on Jun 28, 2009 3:31 PM by reece-roach

    JavaScript/HTML notification problem


      Below problems are in JavaScript/HTML only. In Flex both works well.

      In JavaScript/HTML on Mac, dock icon bounces only once in CRITICAL.
      Below 3 cases(type, CRITICAL, "aaa"), same results.
      How do I use JavaScript code to react doc icon repeatedly?

      function notify() {
      if (air.NativeApplication.supportsDockIcon) {
      var critical = document.getElementById("critical");
      var type = (critical.checked ? air.NotificationType.CRITICAL : air.NotificationType.INFORMATIONAL);
      //air.DockIcon(air.NativeApplication.nativeApplication.icon).bounce(air.Notific ationType.CRITICAL);

      function setListener()
      nativeWindow.addEventListener(air.Event.DEACTIVATE, notify);
      <body onload="setListener()">

      And I have another problem on Windows just as Mac.
      Below cases(type, CRITICAL, ,no argumens) are same results.
      Application windows and taskbar flash only once.
      How do I use JavaScript code to flash window and taskbar??

      function notify(){
      if(air.NativeApplication.supportsSystemTrayIcon && air.NativeWindow.supportsNotification) {
      var critical = document.getElementById('critical');
      var type = (critical.checked ? air.NotificationType.CRITICAL : air.NotificationType.INFORMATIONAL);

      function setListener(){
      window.nativeWindow.addEventListener(air.Event.DEACTIVATE, notify);
      <body onLoad="setListener()">