NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: John Fligg on December 07, 2011, 01:33:15 AM
-
I am not looking for a total solution, but just some general guidance.
I intend defining Mobile Users as those using anything other than a Smartphone. That is so I can use the Mobile checkbox that if it unchecked will hide controls. IOW Smartphone users see only a limited dataset whereas iPad, Netbook and above see all the controls.
No problem there. But equally I want to change the menu type depending on this. That would go by screen size.
Is there some common code/utility that detects the screen size and allows me to change the actual menu type.
Sorry I have not read up yet on CSS and the like so just wondered before I started on work in a particular area of design.
John
-
Not had any response to this so hoping this re post might generate something.
John
-
Here is an example of detecting and altering your css with jQuery
http://www.ilovecolors.com.ar/detect-screen-size-css-style/
Might help get you started
-
bear in mind that the "mobile" menu type is automatically "switched to" when a mobile device is detected.
cheers
Bruce
-
Thansk Bruce but this was my original point.
Exactly what IS a mobile device?
So do I use code to detect screen size and leave that mobile check box unchecked? For my users a mobile device is either a Smartphone or an iPad (or imilar) both of which have totally different screen sizes.
So basically I think what i am asking is that if you check the mobile checkbox you need some criteria somewhere to define what mobile is.
John
-
at the moment we're treating touch based devices as mobile. But you can of course override the IsMobile method in WebHandler to adjust that if you like.
cheers
Bruce
-
Thanks Bruce - that is interesting.
Smartphones - no issue.
iPad (I hate them!!!) - depends on how they use them. Vertically and they are a grandiose smartphone and should be treated accordingly regards screend esign, but run them horizintally and they effectively become a Netbook and could display more information.
I can just see my iPad clients saying they want the application to show more than a smartphone.
So maybe we need something like if screen size <= whatever then it is a smartphone stype.
If > whatever then it is NOT a smartphone style UNLESS it is run vertically in which case it is.
I am not sure that is practical or is it?
Thanks
John
-
I don't think basing it on orientation is practical, or indeed a good idea. No site that I'm aware of changes the site behavior and layout based on orientation. That would be very surprising to the user, and hence a bad thing.
Allowing you access to the screen size though is something I'm looking into.
cheers
Bruce
-
In hindsight I totally agree.
I have a Dell Inspiron Duo that acts exactly like an iPad and running the app vertically the smartphone style is great, horizontally looks a bit strange. However that is down to my design I suspect. But access to the screen size would really help.
Thanks
John