We have been working hard on Ext.NET Mobile and are happy to announce a Beta release is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read more here

[CLOSED] ext:Desktop - changing Wallpaper via JS

  1. #1

    [CLOSED] ext:Desktop - changing Wallpaper via JS

    Is it possible to change wallpaper after page loaded via Javascript. ?

    Like using;

    MyDesktop.setWallpaper('/i/newWallpaper.jpg')


    Thanks
  2. #2

    RE: [CLOSED] ext:Desktop - changing Wallpaper via JS

     Hi Emre,

    yes, it is possible


    <Click Handler="#{MyDesktop}.desktop.setWallpaper('deskto p.jpg');" />





    Vladimir Shcheglov
    Sr. Developer
  3. #3

    RE: [CLOSED] ext:Desktop - changing Wallpaper via JS

    Hey Vladimir,

    First of all, thanks , its nice to know it how to do in listeners.

    My current problem is, the way that I want to call it not with listeners.

    Matter of fact, what am I tring to do is, changing wallpaper regarding to client's screen resolution.

    I have a simple Javascript to get screen resolution, in that script i want to call

    #{MyDesktop}.desktop.setWallpaper('desktop.jpg');

    regarding to cases, however, i cannot use this in script tags. ?
  4. #4

    RE: [CLOSED] ext:Desktop - changing Wallpaper via JS

    Hi Emre,

    In this case you should save the Desktop reference  in js global variable and then use it in your js code


    For example save inj DocumentReady listener


    <ext:ScriptManager ID="ScriptManager1" runat="server">
                <Listeners>
                    <DocumentReady Handler="window.mydesktop = #{MyDesktop}" />
                </Listeners>
            </ext:ScriptManager>




    then you can use it in your js code


    function myJSFunc(){
           window. mydesktop.desktop.setWallpaper.......
    }





    Vladimir Shcheglov
    Sr. Developer
  5. #5

    RE: [CLOSED] ext:Desktop - changing Wallpaper via JS

    Thanks a lot!

    Works like a charm.

Similar Threads

  1. Stretching desktop wallpaper
    By feanor91 in forum 1.x Help
    Replies: 0
    Last Post: Jan 19, 2012, 10:15 AM
  2. Wallpaper halts the Desktop?
    By rlasker3 in forum Bugs
    Replies: 0
    Last Post: Feb 15, 2010, 12:56 PM
  3. Desktop: wallpaper problem
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Jan 30, 2009, 8:40 PM
  4. Replies: 4
    Last Post: Jan 28, 2009, 9:01 AM
  5. Desktop wallpaper cannot load
    By Nime in forum 1.x Help
    Replies: 1
    Last Post: Jan 15, 2009, 11:49 AM

Posting Permissions

Subscribe now to get the latest Ext.NET happenings in our newsletter.