Yes, like that except i've led you astray with the capitalisation, sorry. It should be more like this: <p id="photobutton"> <a href="#" onclick="window.print();return false" onkeypress="window.print();return false" > Click here... </a>
Grant -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Barry Beattie Sent: Wednesday, 22 September 2004 11:22 AM To: [EMAIL PROTECTED] Subject: RE: [WSG] onClick question you mean like this? <p id="photobutton"> <a href="#" onClick="window.print();return false" onKeyPress="window.print();return false" > Click here... </a> (just curious, wanting to get it right) barry.b -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Focas, Grant Sent: Wednesday, 22 September 2004 9:56 AM To: [EMAIL PROTECTED] Subject: RE: [WSG] onClick question Try putting an onKeyPress as well, so that it's device independent Grant Focas -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ted Drake Sent: Wednesday, 22 September 2004 9:36 AM To: [EMAIL PROTECTED] Subject: [WSG] onClick question I'm getting an error message when I try to validate this page: http://v4.csatravelprotection.com/csa/packinglist.do >From the W3C validation service: Line 514, column 40: there is no attribute "onClick" <p id="photobutton"><a href="#" onClick="window.print();return false">Click here... Here is the offending code: <p id="photobutton"><a href="#" onClick="window.print();return false">Click here to print this page</a></p> Why wouldn't this validate? I looked into the O'Reilly html&xhtml guide and it doesn't say anything about it being deprecated. Does anyone have a suggestion? I've got the page set to xhtml 1.0 transitional Thanks Ted ****************************************************** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 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/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ****************************************************** ****************************************************** The discussion list for http://webstandardsgroup.org/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 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/ Proud presenters of Web Essentials 04 http://we04.com/ Web standards, accessibility, inspiration, knowledge To be held in Sydney, September 30 and October 1, 2004 See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************