EXT.NET 3.1 RELEASED! With Tablet Support!
We have been working hard and are happy to announce the release of Ext.NET 3.1. Click here for a full list of changes and make sure you visit our download page now to get the latest version.
Results 1 to 5 of 5

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

  1. #1
    Member
    Join Date
    Dec 2008
    Posts
    14

    [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
    Object.NET + Ext.NET Vladimir's Avatar
    Join Date
    Mar 2008
    Location
    Saint-Petersburg, Russia
    Posts
    15,443

    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
    Member
    Join Date
    Dec 2008
    Posts
    14

    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
    Object.NET + Ext.NET Vladimir's Avatar
    Join Date
    Mar 2008
    Location
    Saint-Petersburg, Russia
    Posts
    15,443

    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
    Member
    Join Date
    Dec 2008
    Posts
    14

    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