This is a migrated thread and some comments may be shown as answers.

Radalerts with different icons on same page

2 Answers 59 Views
Window
This is a migrated thread and some comments may be shown as answers.
Manuel Ortiz
Top achievements
Rank 1
Manuel Ortiz asked on 17 May 2010, 10:29 PM
Hello,

I want to popup two different radalerts on my page depending on specific server side events.  However, I want a different image (by image I am referring to the yellow exclamation mark that the default radalert shows at the left of the text) to appear in each one of them.  For example, I want a checkmark on one and an exclamation mark on the other.

How can I accomplish this?? I have already made the radalert popup to work successfully, I only need to do the image thing.

Thank you in advance,
Manuel

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 18 May 2010, 09:04 AM
Hi Manuel,

Have a look at the following approach in order to show different icons for radalert on same page.

css:
 
    <style type="text/css">  
        .icon1 div.rwDialogPopup  
        {  
            background-imageurl(../Images/image1.gif) !important;  
        }  
        .icon2 div.rwDialogPopup  
        {  
            background-imageurl(../Images/image2.gif) !important;  
        }  
    </style> 

client code for showing alert:
 
    <script type="text/javascript">  
        function callAlert1() {  
            var oWnd = radalert('main text to display', 340, 110, 'new title');  
            var popupElement = oWnd.get_popupElement();  
            popupElement.className = popupElement.className + " icon2";  
        }  
        function callAlert2() {  
            var oWnd = radalert('main text to display', 340, 110, 'new title');  
            var popupElement = oWnd.get_popupElement();  
            popupElement.className = popupElement.className + " icon1";  
        }   
    </script> 
I hope this couls help you. :)

Thanks,
Princy.
0
sravanthi
Top achievements
Rank 1
answered on 02 Sep 2010, 02:02 PM
Hai Princy,

The solution works only on client side.do u have any solution to change the image of the rad alert on server side.
It would be very helpful if any one could help me.

Thanks,
Sravanthi
Tags
Window
Asked by
Manuel Ortiz
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
sravanthi
Top achievements
Rank 1
Share this question
or