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,420

    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,420

    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, 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