Is it possible to change wallpaper after page loaded via Javascript. ?
Like using;
MyDesktop.setWallpaper('/i/newWallpaper.jpg')
Thanks
Printable View
Is it possible to change wallpaper after page loaded via Javascript. ?
Like using;
MyDesktop.setWallpaper('/i/newWallpaper.jpg')
Thanks
*Hi Emre,
yes, it is possible
<Click Handler="#{MyDesktop}.desktop.setWallpaper('deskto p.jpg');" />
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. ?
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.......
}
Thanks a lot!
Works like a charm.