This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes java script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "java script" Watch "java script" New topic
Author

java script

bala manian
Ranch Hand

Joined: Nov 05, 2007
Posts: 40
how to close alert box without clicking ok button ? my ajax function is called only after closing alert box.any chance of closing my alert box automatically after 5 second.any other ways to solve these problem..

thanks in advance...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41586
    
  54
An alert box can't be closed without user action. Why is an alert box being shown if an AJAX function should be called instead? Have you considered other ways of showing a message to the user, e.g. putting it in the web page in a suitably noticeable font?


Ping & DNS - my free Android networking tools app
bala manian
Ranch Hand

Joined: Nov 05, 2007
Posts: 40
can anyone say...what other message display box in java script other than alert box?or any other message display box that close in automactically with few mints?
if so reply soon..
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It is called you would have to code your ow with layers. It is not that hard to do. Here is the basic idea:

Dynamically position a div on the page [position:absolute,top.left,zIndex]
Hide/Show it [display:none,block]
set Your message innerHTML = "foo";
hide it after set period of time [setTimeout]
hide it by a user action [onclick]

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java script