|
From: Lasse Reichstein Nielsen on 4 May 2008 13:48 SAM <stephanemoriaux.NoAdmin(a)wanadoo.fr.invalid> writes: > (snip) something telling you only need to detect user's Win version > right ? Nope. I run Windows XP, but the first thing I turn off is themes, so I have less than the "classic theme". /L -- Lasse Reichstein Nielsen - lrn(a)hotpop.com DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html> 'Faith without judgement merely degrades the spirit divine.'
From: nobody on 4 May 2008 19:51 On Sun, 04 May 2008 19:48:45 +0200, Lasse Reichstein Nielsen <lrn(a)hotpop.com> wrote: >SAM <stephanemoriaux.NoAdmin(a)wanadoo.fr.invalid> writes: > >> (snip) something telling you only need to detect user's Win version >> right ? > >Nope. I run Windows XP, but the first thing I turn off is themes, >so I have less than the "classic theme". > >/L You are not alone - the first thing I do with any PC with XP or Vista I have to work on is setting it to "classic modified", no visual effects whatsoever. And I know quite a few folks that are just as paranoid about it. If only all the users were like that...
From: nobody on 4 May 2008 22:09 On Sat, 03 May 2008 02:02:11 GMT, "nobody(a)nowhere.net" <mygarbage2000(a)hotmail.com> wrote: >I need to pop up a modal JS-based dialog (for some reason can't use >popup window, much less so showModalDialog()), and I'd like to imitate >the system popup titlebar according to user's desktop settings >(classic, XP, Vista). No big deal to make it work, but how do I know >the style to display? Any chance to figure out these settings >programmatically either on the client (preferrable), or possibly in >asp.net from something like Request["ServerVariables"] (not the best >thing but will work for this project). Would prefer cross-browser >compatibility, but can use IE-specific solution (sorry, no client side >activeX may be used, just plain JS/DOM/DHTML). Asking the user to >manually select visual preferences is not an option. > >Thanks > >NNN OK guys here's the hack that seems to differ between XP and classic style on XP box. Tested with both IE and FF. Don't have Win2k and Vista boxes to test - have to wait until get to the office, but sure (well, almost) Vista will work similar to XP, so the scrollTop in combination with client OS will give the needed result. If I'm not mistaking, win2k is Classic by default. Wanna see how it's different? remove "visibility:hidden;" from div style and see for yourself. It is important that the img size is exactly 197x119 to work with the div sized 190x139px; for any other image size the div needs to be resized the same number of px as the img. Please note - this is 'quick and dirty', surely not production quality but good enough as a concept proof. ;) Any comments will be greatly appreciated. NNN <html> <head> <script language="javascript" type="text/javascript"> function body_onload() { var isIE=(window.ActiveXObject); var div=document.getElementById('splash'); if(isIE)div.style.height='142px'; try { div.scrollTop=1; } catch(err){;}//not sure if need try/catch - just in case var thing=div.scrollTop; div.style.display='none'; if(thing==0)alert('Classic'); else if(thing==1)alert('XP'); } </script> </head> <body onload="body_onload();"> <div id="splash" style="width:190px;height:139px;overflow:auto;"><img src="alertClassic.jpg" style="border:#dddddd 2px solid" height="119px" width="197px"/> </div><!--picked the first image I had in the work folder, 197x119 px. If you want to use any other image, size the div accordingly /--> </body> </html>
From: rf on 4 May 2008 23:02 "nobody(a)nowhere.net" <mygarbage2000(a)hotmail.com> wrote in news:b5ns149b7vd57oiis2agn7gu45pq6qmuh1(a)4ax.com: > On Sat, 03 May 2008 02:02:11 GMT, "nobody(a)nowhere.net" > <mygarbage2000(a)hotmail.com> wrote: > > OK guys here's the hack that seems to differ between XP and classic > style on XP box. Tested with both IE and FF. Seamonkey gets it wrong. Safari gets it wrong. I wonder how many other browsers get it wrong. What you persue will fail if I simply change my colour scheme. Your "dialog" will *not* look like the rest of the stuff on my desktop. -- Richard Killing all google groups posts The Usenet Improvement Project: http://improve-usenet.org
From: nobody on 5 May 2008 00:25 On Mon, 05 May 2008 03:02:08 GMT, rf <rf(a)x.invalid> wrote: >"nobody(a)nowhere.net" <mygarbage2000(a)hotmail.com> wrote in >news:b5ns149b7vd57oiis2agn7gu45pq6qmuh1(a)4ax.com: > >> On Sat, 03 May 2008 02:02:11 GMT, "nobody(a)nowhere.net" >> <mygarbage2000(a)hotmail.com> wrote: >> >> OK guys here's the hack that seems to differ between XP and classic >> style on XP box. Tested with both IE and FF. > >Seamonkey gets it wrong. >Safari gets it wrong. These browsers extremely rearly, if ever, are used in corporate environment - and corp is the targeted audience. Besides, I don't have a Mac to test it on Safari and have no plans to buy one - all places where I've ever worked were Microsoft shops. >I wonder how many other browsers get it wrong. The spec calls for full functionality in IE and core functionality in Firefox. No other browser mentioned. > >What you persue will fail if I simply change my colour scheme. Your >"dialog" will *not* look like the rest of the stuff on my desktop. Corporate users rearly even know how to customize the desktop; besides they oftentime don't have rights to do so. The ones who know and have sufficient rights - they most of the time pick Classic desktop, no color scheme, font, etc. modifications. Anyway, if somebody has a preference for some crazy mix of pink and green - that's none of my business, they'll get a standard XP or Classic popup. NNN
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Why do this? <SCRIPT TYPE="text/javascript" Next: JavaScript A* Path Finding Prototype |