Bill
asked on
How to display Coldfusion alert message box icons
I want to display various alert messages and have different icons displayed based on the type of error message. i.e.:
Question
Information
Warning
Criticial
Can some provide me with the correct way to display these icons?
Thank you for your assistance
Question
Information
Warning
Criticial
Can some provide me with the correct way to display these icons?
Thank you for your assistance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No. cfmessagebox was introduced in CF9. For CF8, you'd have to create your own using cfwindow or cfdiv.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
btw- if you want to make the header taller (the default size is 25px and that might make your icon too small)
you need to add a few more style defs
<style>
.x-dlg-dlg-body{
top:45px!important; /*this sets the position of the window body in relation to the header. It should be the same # px ans the height set in the header classes*/
}
.infHdr { background: url(/CFIDE/scripts/ajax/re sources/ex t/images/d efault/lay out/Icon.g if) no-repeat ;
color:black;
font:normal 11px tahoma, verdana, helvetica;
text-align: center;
font-weight:bold;
height:45px!important; /*the height of the header. should be the same as the gif height*/
display:block;
}
.critHdr { background: url(/CFIDE/scripts/ajax/re sources/ex t/images/d efault/lay out/Icon.g if) no-repeat ;
color:red;
font:normal 11px tahoma, verdana, helvetica;
text-align: center;
font-weight:bold;
height:45px!important; /*the height of the header. should be the same as the gif height*/
display:block;
}
</style>
you need to add a few more style defs
<style>
.x-dlg-dlg-body{
top:45px!important; /*this sets the position of the window body in relation to the header. It should be the same # px ans the height set in the header classes*/
}
.infHdr { background: url(/CFIDE/scripts/ajax/re
color:black;
font:normal 11px tahoma, verdana, helvetica;
text-align: center;
font-weight:bold;
height:45px!important; /*the height of the header. should be the same as the gif height*/
display:block;
}
.critHdr { background: url(/CFIDE/scripts/ajax/re
color:red;
font:normal 11px tahoma, verdana, helvetica;
text-align: center;
font-weight:bold;
height:45px!important; /*the height of the header. should be the same as the gif height*/
display:block;
}
</style>
I don't think this question should be deleted. These two responses answer the question of how to create a message box with a custom icon in CF8 and CF9:
* How to create a message box in CF9
* How to create a message box in CF8
* How to create a message box in CF9
* How to create a message box in CF8
ASKER
Does this solution work on versions 8 & 9
Thank you