Thanks for the help,
My solution has been to change:
<a href="#" onclick="if(!window.print){alert('Your browser does not
support this feature.Please select print from the file
menu')}else{window.print()};return false;">Print</a>
to this:
HTML:
<a href="#" onclick="printPage();" onkeypress="return
handleEnter(event);" class="topNav">Print</a>
JAVASCRIPT:
function handleEnter(ev) {
var ENTER_KEY=13;
var keyCode = ev.keyCode ? ev.keyCode : ev.which ? ev.which :
ev.charCode;
if (keyCode == ENTER_KEY) {
printPage();
return false;
}
}
function printPage(){
window.print?window.print(): alert('Sorry, your browser does not
support this feature. Please choose print from the file menu.');
}
This now works in Mac IE5.0,5.1,5.2 but Safari 1.0.3 and Mac Netscape
7.2 still do not even allow keyboard tabbing.
Grant
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Webmaster
Sent: Thursday, 22 September 2005 9:49 AM
To: [email protected]
Subject: RE: [WSG] keyboard onclick activation on Mac
Patrick H. Lauke quoth:
> Or, if you must, and your audience does include Mac users, write your
own
> little javascript filter function to ignore TAB before activating
whatever
> behaviour is in the onclick.
And indeed one for the Enter key.
I guess the point I was trying ot make is that these keys already had
specific amnd well understood functions well before the Internet
infected
the ether.
It shouldn't have been a leap of thought to reserve them for exclusive
functions. As you say, the W3C got it wrong. Nuff said.
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************