hi,
i face this problem from last three days,
i want to disappear the alert box of javascript on time base,
for example when page is load and the alert box is appear,i want to remove it after 10seconds if the user not press the ok button,
thanks in advance

Recommended Answers

you probably could not do that with an alert() function but if you created a modal say for example you could do it on that using the setTimeout() function.

Jump to Post

modal is like an overlay or a dialog box basically.
http://www.shadowbox-js.com/usage.html
This link gives you an idea of how to plug it in.

Its features are similar to lightbox/thickbox

Jump to Post

All 5 Replies

you probably could not do that with an alert() function but if you created a modal say for example you could do it on that using the setTimeout() function.

thanks for the quik rply
please explan how i do it,
i waste alot of time on it but get nothing i need this thing

Member Avatar

You want to programmatically get rid of an alert box? Alert boxes are there to warn the user of something. Getting rid of them via code is not something I imagine is something that the browser would want you to do. Bit dodgy?

Using a modal form as mentioned may be better. jQuery has some good UI plug-ins - see the jqueryui.com site.

Maybe you want PHP to set a message that a div will appear it (example always in centre of screen) and if not pressed ok in 10 seconds to disappear). This is simply DOM with JavaScript or as once referred DHMTL ;)))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.