EXT.NET v3.0 BETA RELEASED!
Now with Tablet Support!
Ext.NET v3.0 Beta is here with lots of new cool features and now with tablet support! Check Examples Explorer now to see it in action or download and test it yourself for free!
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
    Ext.NET - Dev Team Vladimir's Avatar
    Join Date
    Mar 2008
    Location
    Russia
    Posts
    15,376

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

    テつ*Hi Emre,

    yes, it is possible


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





    Vladimir Shcheglov
    Ext.NET, Inc.
    Development Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  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
    Ext.NET - Dev Team Vladimir's Avatar
    Join Date
    Mar 2008
    Location
    Russia
    Posts
    15,376

    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
    Ext.NET, Inc.
    Development Team

    Ext.NET Examples | Ext.NET API Docs | ExtJS API Docs | Twitter | Jobs

  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, 11:15 AM
  2. Wallpaper halts the Desktop?
    By rlasker3 in forum Bugs
    Replies: 0
    Last Post: Feb 15, 2010, 1:56 PM
  3. Desktop: wallpaper problem
    By heysol in forum 1.x Help
    Replies: 0
    Last Post: Jan 30, 2009, 9:40 PM
  4. Replies: 4
    Last Post: Jan 28, 2009, 10:01 AM
  5. Desktop wallpaper cannot load
    By Nime in forum 1.x Help
    Replies: 1
    Last Post: Jan 15, 2009, 12:49 PM

Posting Permissions