This week's book giveaway is in the HTML, CSS and JavaScript forum.
We're giving away four copies of hapi.js in Action and have Matt Harrison on-line!
See this thread for details.
Win a copy of hapi.js in Action this week in the HTML, CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Alert();

 
Rolandas Razma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there is some way to remove alert earlyer then timeout hits?

Alert al = new Alert("MyAlert");
al.setString("blah");
al.setTimeout(10000);
display.setCurrent(al);

{ some code where i changed my mind and want to close allert imediatly without waiting 10000 }
 
karan rajan
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Just put an Command in the Alert.. some thing like like this should hold..

Command CMD_BACK = new Command("Back",Command.BACK , 1);
alert.addCommand(CMD_BACK);

You may have to handle it on the CommandAction method..
[ March 07, 2005: Message edited by: karan rajan ]
 
zoomtn zoomtn
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!