Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appearance of a confirm box

Status
Not open for further replies.

stewartwebb

Programmer
Jan 6, 2004
92
GB
Hi all,

Can anyone tell me if it's possible to change the appearance of a confirm box? Like change the colour of the buttons and backgound.

Thanks

Stewart
 
Ok,

What i'm going to try and do now is create a custom confirm box which can be used on many pages.
My plan is to try and make the code the same as you would on a normal call to display a confirm box, but to change 'confirm' to 'funcConfirm', which will call a javascript juction and do a window.open.
I have 1 small problem that I can see. When you do a confirm the code stops until the user clicks a button, then continues. But with a window.open , the code will open the window but then contine through the rest of the code. Is there a way to make the code stop until the user has clicked 1 of the buttons? Or does anyone have a better way to solve this problem?

Thanks

Stewart.
 
In IE, you could use a modal dialog... but I don't think these are (fully) supported in other popular browsers. If your browser audience is IE only (e.g. intranet, etc), then this would be one way to go. Otherwise, you'll have to use some clevere DHTML trickery to get around this.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Thanks BRPS,

All the users are ie. So i'll look into modal dialog thanks.

Stewart.
 
Stewart said:
Or does anyone have a better way to solve this problem?
Use the regular confirm box. It will confuse people less, load quicker and work in all environments as expected.
 
If your audience is IE-only go for the modal dialog. You can style it just about any way you like, so it will fit the style of your site better. It's very easy to use and very flexible too. I've used them for everything from simple OK dialogs to input dialogs.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top