Peter Thompson wrote: > The following code does not validate. XMLSpy indicates "the element > has no declaration for an attribute named 'onkeydown'". What do I > need to do to get the 'onkeydown' to validate? > > ----------------- > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" > "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> > <svg width="100%" height="100%"> > <rect width="100%" height="100%" fill="blue" onkeydown="press(evt)"/> > </svg>
onkeydown isn't in the spec, it is an Adobe extension, see http://wiki.svg.org/index.php/MouseIndependentKeyboardEvents for details. I believe it is valid only as attribute of the svg element, it doesn't make sense on an another element, since there is no notion of focus in SVG 1.0 (hit me on the head if that's false :-) ). Well, this focus thingy can be simulated in JS, ie. if the user clicks on a rectangle simulating a text input field, the code can draw a caret in this rectangle and all user input (at global SVG level, then) will go there. And hitting Tab key can be managed to go to next field. But it is not defined in SVG 1.1. -- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- For servers mangling my From and Reply-To fields, -- please send private answers to PhiLho(a)GMX.net -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/