Re: [WSG] Javascript to check for Handheld Devices

2007-03-02 Thread TuteC

Once I saw a Nokia trying to serve a wide (media=screen) CSS, I
solved it using a media=handheld stylesheet, almost empty. It would be
a problem if these little devices are trying to load the 'screen'
sheet, do you have handheld specific defined sheets in your code?
Sorry to ask, but if it doesn't help you then it'll help me.

Best regards;
Eugenio Costa.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-02 Thread Nick Fitzsimons

On 2 Mar 2007, at 14:15:31, TuteC wrote:


Once I saw a Nokia trying to serve a wide (media=screen) CSS, I
solved it using a media=handheld stylesheet, almost empty. It would be
a problem if these little devices are trying to load the 'screen'
sheet, do you have handheld specific defined sheets in your code?
Sorry to ask, but if it doesn't help you then it'll help me.



Just to add to the general flow of information here: Microsoft's IE  
Mobile, which is used on phones and handhelds (e.g. iPaq PDAs)  
running Windows Mobile (formerly Windows CE), will apply stylesheets  
of media type screen *AND* handheld. This means that any rules in  
the screen stylesheet which must not apply on the handheld device  
_must_ be explicitly overridden, which is a bad thing as obviously  
one wants to keep the handheld download as small as possible.


(Note that IE Mobile is not the same as IE for normal Windows - it's  
a totally different and, in certain other respects, more standards- 
compliant browser.)


When I raised this with the IE Mobile team last year, their attitude  
was basically that as their kit had always done that, they couldn't  
change it for fear of breaking existing stuff.


(One team member also commented that his current PDA had an 800x600  
screen, so was perfectly capable of handling a lot of screen styling.  
I didn't bother pointing out that we don't all get the latest kit  
supplied by a rich employer like MS, nor do we all get the kind of  
salaries MS offer to waste on gadgets.)


They did admit that they weren't quite sure why they'd missed out the  
button element when they implemented HTML 4.01 several years ago,  
but apparently it's now in very recent versions.


Just to add to the fun, IE Mobile offers several rendering modes -  
honour the source, put everything in a narrow column no matter what,  
and something in between, as far as I can tell. Some of these will  
ignore various aspects of both the markup and the styling to try to  
get everything to fit. These work in ways that I have never found any  
meaningful documentation for, although in at least one rendering mode  
it will apply its own styles for certain elements (e.g. ul) in a  
way that will override anything you try to do.


It also supports switching from landscape to portrait mode, under the  
user's control, so you can't make any assumptions about the screen  
dimensions, or whether the screen is wider than it is tall or not.


Finally, the manufacturer of the equipment (phone, PDA, whatever) can  
make their own low-level configuration changes to the IE install, and  
select which options can be overridden by the user. So one device may  
allow the user to select the rendering mode to use while another only  
ever allows the use of one rendering mode - usually the one which  
leads to the most unpredictable results.


On the bright side, recent (version 5 upwards, I think, which is  
about 18 months - 2 years old) do support the use of XMLHttpRequest  
(via the MSXML ActiveX approach). Ain't life wonderful...


HTH,

Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



[WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Lee Powell

Hi

I'm currently developing a stylesheet for handheld devices. However  
while testing I have noticed that the javascript I've written for  
screen browsers is still being implemented while testing with  
handhelds, causing a few problems.


Does anyone have any advice on how I can check if the device  
accessing the page is handheld or screen and offer up the relevant  
javascript?


Thanks

Lee


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Tim

Will major search engines for phones take any notice of javascript?

Google
http://www.google.com/xhtml/
Ask
http://m.ask.com/

They ignore stylesheets even if you make one for small screens!
They strip the page headers of meta tags, linked javascript gone is my 
guess?

Should we give up making pages for small screen?
Just W3C validate and accessibility test.

Some user agents in server logs show a different user agent phone type 
like nokia et al.


Tim



On 01/03/2007, at 8:25 PM, Lee Powell wrote:


Hi

I'm currently developing a stylesheet for handheld devices. However 
while testing I have noticed that the javascript I've written for 
screen browsers is still being implemented while testing with 
handhelds, causing a few problems.


Does anyone have any advice on how I can check if the device accessing 
the page is handheld or screen and offer up the relevant javascript?


Thanks

Lee


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



The Editor
Heretic Press
http://www.hereticpress.com
Email [EMAIL PROTECTED]



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Barney Carroll

Tim wrote:
My meta tag base href were taken out of pages by ask.com the mobile 
version http://m.ask.com/


This allowed them to run my site by relative URLs on their server with 
fake paypal links en all.


Jesus, that's horrible!

Excuse my ignorance. It seems then, that all the best opportunities for 
designers to optimise for small devices and screen readers are being 
usurped by the developers.


Do they really know better?


Regards,
Barney


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Tim

They know better I recokon (Aust drawl accent LOL)
All we have to do is validate and accesibilitise :-)
No, sorry Barney for the pun, I hate the reality I want to make mobile 
phone stylesheets that will be observed.
Javascript and anything else as the Guttenberg  designer said to the 
Pope


Tim

On 01/03/2007, at 10:47 PM, Barney Carroll wrote:


Tim wrote:
My meta tag base href were taken out of pages by ask.com the mobile 
version http://m.ask.com/
This allowed them to run my site by relative URLs on their server 
with fake paypal links en all.


Jesus, that's horrible!

Excuse my ignorance. It seems then, that all the best opportunities 
for designers to optimise for small devices and screen readers are 
being usurped by the developers.


Do they really know better?


Regards,
Barney


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



The Editor
Heretic Press
http://www.hereticpress.com
Email [EMAIL PROTECTED]



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Terrence Wood

On 1/03/2007, at 10:25 PM, Lee Powell wrote:
Does anyone have any advice on how I can check if the device  
accessing the page is handheld or screen and offer up the relevant  
javascript?




Best bet - create a mobile specific domain... failing that you could  
test for an arbitrary property:


if (screen.width  640) {
// your code
}

kind regards
Terrence Wood


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Mordechai Peller

Barney Carroll wrote:
Excuse my ignorance. It seems then, that all the best opportunities 
for designers to optimise for small devices and screen readers are 
being usurped by the developers.


Do they really know better? 
In most cases, sadly they do. The vast majority of sites can't be viewed 
on mobile devices without help. It seems that there's at least a 
perception of lack of interest in developing CSS for them. Of course, 
their lack of CSS support might be why.


Which came first: the chicken or the egg?


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread David Storey
This should not happen with Opera browsers (Opera Mini and Opera  
Mobile).  We specifically ask Google and other search engines not to  
give us transcoded results when our users search using their search  
engines.  If they do then it is a bug and we want to know about it so  
we can ask them to correct this behaviour.


For styling the page handheld stylesheets should be used.  For  
JavaScript issues I don't know of a way to specifically detect if it  
is a handheld, and browser sniffing is far from ideal on mobile due  
to many reasons.


Tim do you have a specific example of what issues are being caused,  
then I can look into them?  Also which browsers are you testing on.   
Some mobile browsers have very poor JavaScript support.  Browsers  
such as Opera Mobile have full JavaScript support.  Opera mini is  
slightly more restricted in that it uses a client server  
architecture, so there is no AJAX, but by developing using  
progressive enhancement it should work, depending on how complex the  
site is you are trying to develop.


On 1 Mar 2007, at 12:30, Tim wrote:

Barney, some mobile phone opimisation search engine versions  for  
phones DO remove meta tags on the fly.


My meta tag base href were taken out of pages by ask.com the mobile  
version http://m.ask.com/


This allowed them to run my site by relative URLs on their server  
with fake paypal links en all.
They do remove meta tags Barney in at least some mobile search  
engines.

Google mobile disables form, http://m.ask.com/ does not.

Tim

On 01/03/2007, at 9:42 PM, Barney Carroll wrote:


Tim wrote:

Will major search engines for phones take any notice of javascript?
Google
http://www.google.com/xhtml/
Ask
http://m.ask.com/


Tim, why would this be a problem? Google isn't a handheld device,  
it's a search engine. It doesn't matter what /it/ thinks.


And if you're afraid it messes with pages it links to, that isn't  
the case.



Regards,
Barney


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



The Editor
Heretic Press
http://www.hereticpress.com
Email [EMAIL PROTECTED]



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



David Storey
Chief Web Opener
Opera Software
Oslo, Norway

W: http://my.opera.com/dstorey
✉ : [EMAIL PROTECTED]
✆ : +47 24 16 42 26





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Rob Crowther

David Storey wrote:
For styling the page handheld stylesheets should be used.  For 
JavaScript issues I don't know of a way to specifically detect if it is 
a handheld, and browser sniffing is far from ideal on mobile due to many 
reasons.


Could you give an element a specific style in the handheld stylesheet 
and then test for that style being applied in the javascript?  I'm 
thinking along the lines of:


in screen.css:
 #checker {width:1px;}

in handheld.css:
 #checker {width:2px;}

in script.js:
 var el = document.getElementById(“checker”);
 if (window.getComputedStyle(el,).getPropertyValue(width) == '2px' )
 {
/* handheld script goes here

No idea if it would execute in whatever handheld browser is needed, and 
my brief research indicates this style grabbing in javascript is a bit 
flaky cross browser even on the desktop, but you might be able to hack 
something together that works a lot of the time.


Rob


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Paul Bennett
Hi David,

In my experience, you can't guarantee that a mobile device will be a full 
fledged 'browser' (like Opera mini or Safari for the iPhone), so you don't know 
if JS will be supported on a handheld device. This may be less likely now, but 
is still valid.

Example: About 3 - 4 years ago I had a Palm based Kyocera which did a pretty 
good job of rendering HTML (including allowing you to submit form data), but 
had no JS or CSS support.

Is there anything wrong with using something like:

 @media handheld { /* insert rules here */ }

http://developer.openwave.com/documentation/xhtml_mp_css_reference/css-ref5.html#669571

Also, this may be helpful:
http://developer.openwave.com/documentation/xhtml_mp_css_reference/

Let us know what you think,
Paul

***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Ben Dodson

Search Engines don't read JavaScript but the question wasn't about
search.

Lots of mobile devices think that they are actually screen browsers so this
may be causing some problems - My phone (Nokia N73) has 2 browsers; one that
reads handheld sheets and one that reads screen sheets.

Can I ask what javascript you are trying to serve that would be different on
a handheld browser rather than a screen browser?

Ben


On 01/03/07, Tim [EMAIL PROTECTED] wrote:


Will major search engines for phones take any notice of javascript?

Google
http://www.google.com/xhtml/
Ask
http://m.ask.com/

They ignore stylesheets even if you make one for small screens!
They strip the page headers of meta tags, linked javascript gone is my
guess?
Should we give up making pages for small screen?
Just W3C validate and accessibility test.

Some user agents in server logs show a different user agent phone type
like nokia et al.

Tim



On 01/03/2007, at 8:25 PM, Lee Powell wrote:

 Hi

 I'm currently developing a stylesheet for handheld devices. However
 while testing I have noticed that the javascript I've written for
 screen browsers is still being implemented while testing with
 handhelds, causing a few problems.

 Does anyone have any advice on how I can check if the device accessing
 the page is handheld or screen and offer up the relevant javascript?

 Thanks

 Lee


 ***
 List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
 Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
 Help: [EMAIL PROTECTED]
 ***


The Editor
Heretic Press
http://www.hereticpress.com
Email [EMAIL PROTECTED]



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***





--
e: [EMAIL PROTECTED]
w: http://www.bendodson.com/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***


Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Michael MD
No idea if it would execute in whatever handheld browser is needed, and my 
brief research indicates this style grabbing in javascript is a bit flaky 
cross browser even on the desktop, but you might be able to hack something 
together that works a lot of the time.


flaky would be an understatement...
what if the browser can't execute javascript?

what proportion of mobile phones can execute javascript?... I don't think 
many can


Some phones do support css but a lot don't ... so the page should be 
designed to be usable without it.


(and I am talking about phones new enough to be able to read xhtml - not 
older models that can only do wml) 





***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Javascript to check for Handheld Devices

2007-03-01 Thread Marghanita da Cruz

FYI, apologies, if it this has already been posted here,
From: Dominique Hazael-Massieux [EMAIL PROTECTED]

(sorry for cross-posting, please follow-up on [EMAIL PROTECTED])

Hello Mobile Web Fans,

The recently chartered Mobile Web Test Suites Working Group [1] is
seeking public feedback on one of its proposed deliverables : an open
testing framework for the Mobile Web, testing mobile web user agents for
the benefits of mobile web developers.

The overall goal of such a framework would be to allow the community to
understand better how mobile web user agents available today react to
various authoring practices (CSS tricks, javascript compatibility,
advanced markup techniques, etc).

To that end, the Test Suites Working Group is looking at setting up a
framework that would allow:
  * anybody to submit test cases that they think would help assess
support of a specific technical point in user agents; a few
groups and individuals have already started to collect some of
these tests cases, and the Working Group would like to serve as
a point of collection and development for these
  * anybody to submit test results based on the above mentioned test
cases
  * anybody to consult the statistical results posted by the
community; these could hopefully lead at the creation of
compatibility tables as some have been developed in the desktop
browser world

The Working Group would review, select and possibly amend the test cases
submissions to produce a blessed test suite that would get most of the
focus, but may still hosts the other test cases in case they would help
a more restricted community.

Before we invest the time and effort required to make such a system
possible, the Working Group would like to get feedback on this project,
in particular to see how many of Web developers would be interested in
contributing to that project, as well as using its results.

To that end, we have set up a fairly short survey that shouldn't take
you more than a few minutes to answer:
http://www.w3.org/2002/09/wbs/1/mwits/

The survey is open until March 16 (but please let me know if you think
you'll need more time).

We would also appreciate if subscribers to these lists could forward
that request for feedback to other relevant groups and communities as
they see adequate, including blogging about it if they see this as a
relevant topic for their audience. The level of answers we'll get on
this survey will also help us assess the usefulness and the practicality
of setting up such a system.

Thank you for your time,

Dom
Mobile Web Test Suites WG co-chair

1. http://www.w3.org/2005/MWI/Tests/

--
Marghanita da Cruz
http://www.ramin.com.au/itgovernance
Telephone: 0414-869202
Ramin Communications Pty Ltd
ABN: 027-089-713-084









***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***