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

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 for diafol

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.