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

Changing IconUrl dynamically?

2 Answers 139 Views
Window
This is a migrated thread and some comments may be shown as answers.
Christoffer Rosenqvist
Top achievements
Rank 1
Christoffer Rosenqvist asked on 28 Oct 2009, 04:07 PM
Hi!

I want to set both the NavigateUrl and the Icon from code - client script or otherwise - but so far I've only found the setUrl method for RadWindow. How can I change the Icon for the RadWindow?

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 28 Oct 2009, 09:54 PM
Although it deals with an alert, I believe this forum post will be useful to change the icon dynamically (through javascript). There's also an attached example which you can play around with.
0
Christoffer Rosenqvist
Top achievements
Rank 1
answered on 29 Oct 2009, 09:20 AM
Using jQuery, this is easily done like this:

From the document inside the RadWindow do:
GetRadWindow().BrowserWindow.ChangeWindowIcon(icon); 

In the containing document do this:
function ChangeWindowIcon(icon) { 
    icon = 'url('+ icon + ')'
    $('a.rwIcon').css({ 'background-image': icon }); 



That's it.


Tags
Window
Asked by
Christoffer Rosenqvist
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Christoffer Rosenqvist
Top achievements
Rank 1
Share this question
or