PDA

View Full Version : Can this be done? Deals with OnClick


Athmaus
05-18-2005, 09:41 PM
I need to know if this is possbile as i have looked through many different sites and have not found an answer yet.

I have a page on my site, well when they click a button i want a windows alert style popup to come up.

I want to put some message in there, with two buttons.

If peopel hit button 1, it will give them a download or redirect to a different page.

If people hit button 2, it will close the page they are on.

Any ideas?

Basscyst
05-18-2005, 09:50 PM
That can be done using confirm() which returns true when they press ok, and false on cancel. You cannot however close the window, unless it is a window that you initially opened.

Basscyst