views:

59

answers:

2

A lot of my visitors are blind (with it being a site for the blind), and often when trying to diagnose problems, I'd like to know what version of browser etc they're using, whether flash is installed. Because more often than not, someone will swear they are using X, when in fact Y is installed. Currently, I'm using http://jsbrwsniff.sourceforge.net/usage.html piped into an email, but I've got 2 problems here:

First of all, jsbrwsniff is quite "heavy" and hasn't been updated since early 2007, so there's a lot of -1's in the result.

Secondly, if I call it as follows, the page reloads:

<a href="#" onclick="sendEmail()">Email feedback</a>

And if I call it like this, the page goes blank and looks like it's trying to infinitely load a blank page:

<a href="javascript:sendEmail()">Email feedback</a>

See the nightmare for yourself here: http://kingston.talking-newspapers.co.uk/

Now, I know there are 1001 articles and comments here and elsewhere saying "don't use browser sniffers, they can be spoofed (etc)", but honestly, you'll have to trust me that this is a significantly useful tool when you're talking someone in their more "senior years" and using a screenreader through "help > about", when they've clicked the wrong window to start with!

I'm using jquery anyway in the site, and I'm aware of $jQuery.browser and $jQuery.support, but these don't tell me the elements I need (like whether Flash is installed, and what version etc). I've looked everywhere for a jquery plugin for my needs, with no luck.

Finally, if I have to stick to the current method of jsbrwsniff then it's not the end of the world, but if anyone knows a way of launching the user's email client populated with the information I need but WITHOUT refreshing or blanking the page, I'd love to know.

BTW - there's a good reason for not using a webform, which is simply because it's easier for the screen-reader user to use an email client they are used to.

Thanks!

+5  A: 

Tthat E-Mail should definitely be sent from the server side IMO.

You could make an Ajax request containing all the information you are sniffing to a PHP or other server side script. That script would receive the data and send the E-Mail. It's much more reliable that way.

Other than that, can you emphasize your exact question - is it the sniffing part, or the sending part...?

Pekka
Agreed. When you're aiming to make an accessible site, make it with good old fashion techniques that screen readers won't choke on.
Gert G
It's mainly the sending part - RNIB guidelines demand that the page is kept as clean as possible and interaction is made as easy as possible.At the moment, they can press 9 and click send and that's all I need. What I don't need is for them to have to fill in a form with their email address etc.So, if it has to be one question, then I'd be happy if I could get the click to send the email working WITHOUT the page refreshing (thus losing their current tabbed browsing point or place in the audio).
talkingnews
@talkingnews do you need peoples' E-Mail addresses? Or can you figure out from the occurrence of a request for help, and a report being sent who it comes from?
Pekka
@pekka - you know, that's a good point. It's not like I get this 5 times a day, more like 2-3 times a week. It's just that if I get a "can you help me?" question with no return address, that might suck.
talkingnews
@talkingnews I see. Hmm, maybe have a dynamic form field pop up with the E-Mail address and then send it out via Ajax? I don't know how that jibes with accessibility guidelines, though...
Pekka
@talkingnews or, have a button that sends the client information using Ajax; then display some text like "please contact me on the phone / via E-Mail for assistance. Use the following number for reference: 1234" the reference number (optional, not sure whether it's even necessary) tells you which automated E-Mail is the right one for that user contacting you.
Pekka
@pekka - I like that! Good idea. Thanks
talkingnews
+1  A: 

When the user want's to submit the browser details, you could dynamically create a form (e.g. in a hidden DIV) that contains all the deails you need and inoke the users email client by using a mailto: action URL. For details, see http://www.javascript-coder.com/javascript-form/javascript-email-form.phtml

But I'm not sure how to get the mail automatically sent. That would seem to transcend the security of the browser. So, your users will still have to click send.

mdma