Faqts : Computers : Programming : Shopping For You : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

25 of 31 people (81%) answered Yes
Recently 9 of 10 people (90%) answered Yes


How can I create a confirm window with buttons different from OK & Cancel? (also 3 btns instead 2)
The call is in an onload event so pop-up window can't be used(pop-up blockers)

Apr 7th, 2008 23:39
ha mo, Colin Fraser, Andre A,

There are a number of ways that you can do this, but I am not going to
code it for you. Just dont have the time, sorry.  However, as an
outline, try:
1. Use a javascripted page:
       The event that triggers the confirmation calls a function that 
        a)Creates a new window that is small 
        b)Displays no object other than the title bar.  
        c)Displays a dynamic confirmation message 
        d)Displays 3 buttons created by a form in the code, each one
          the open window, but is also connected to a function that does
          something different. 
One problem is that the window will remain open until it is clsed by the
user, so if someone clicks off it, then it will just drop behind the
current active window. 
2. Create a small page, without toolbars or menu or status bar or any
other feature like the one above, however, include in the body tag the code:
       <body onBlur="self.focus"> 
This should overcome the problem stated above. For whatever reason, I
cannot get the onBlur to work when coded directly from the parent, maybe
someone else can. 
Other options can be found here : 
Good luck.