[Dojo-interest] hiding dojo.Toaster with javascript

Herbert Liechti herbert.liechti at thinx.ch
Sun Jan 7 15:38:22 MST 2007


Hi

I'm trying to hide a dojo.Toaster widget with javascript.
I'm using the method hide(), which is hiding the widget
but when the next message is displayed the old text
is displayed too. Text goes away only when I click on
the toast widget. Here a minimal example.

The behavior should be.

  - User requests data
  - Toast message appears (please wait)
  - Data returns
  - Toast messages disappears and is cleared
 


      function callHome( action, request ) {
         dojo.event.topic.publish("Message", {message: "Daten werden
geladen..."});
         dojo.io.bind( {  ....
            load: responseFromHome
            ....
         }
     }

     function responseFromHome( type, data, evt ) {
         .....
         toast.hide();
     }
      var toast = null; // Message box
      dojo.addOnLoad(function(){
         toast = dojo.widget.byId("toast1");
      });

Here the widget declaration:

<div dojoType="toaster" id="toast1" duration="0" positionDirection="br-up" messageTopic="Message"></div>




Thanks for the help & best regards
Herbie


More information about the Dojo-interest mailing list