Changing IconUrl dynamically?

3 posts, 0 answers
  1. Christoffer Rosenqvist
    Christoffer Rosenqvist avatar
    28 posts
    Member since:
    Oct 2009

    Posted 28 Oct 2009 Link to this post

    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. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 28 Oct 2009 Link to this post

    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.
  3. Christoffer Rosenqvist
    Christoffer Rosenqvist avatar
    28 posts
    Member since:
    Oct 2009

    Posted 29 Oct 2009 Link to this post

    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.


Back to Top