WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: onSelect vs. onClick

for

From: John Foliot - bytown internet
Date: Jan 8, 2003 5:27PM


with respect to Jared, in XHTML all event handlers are all lowercase,
including "onclick" and "onkeypress". I am not aware of any browser that
does not recognize the all lower-case event handlers, but stand to be
corrected if someone is aware of any issues.

JF

> -----Original Message-----
> From: Jared Smith [mailto: <EMAIL REMOVED> ]
> Sent: Wednesday, January 08, 2003 1:26 PM
> To: <EMAIL REMOVED>
> Subject: Re: onSelect vs. onClick
>
>
> I believe you want onKeyPress instead of onSelect. onSelect is for
> text and textarea elements only. onKeyPress triggers when the enter
> key is pressed with the link selected.
>
> I think you want both onClick (with CAPITAL C) and onKeyPress, so
> you capture both mouse and keyboard activations.
>
> <a href="note-glossary.asp#ce"
> onClick="NoteWindow('note-glossary.asp#ce','glossary',
> 375,300);return false;"
> onKeyPress="NoteWindow('note-glossary.asp#ce','glossary',
> 375,300);return false;" target="_blank" title="Link opens in new
> window">Carotid
> Endarterectomy</a>
>
> Jared Smith
> WebAIM (Web Accessibility In Mind)
> Center for Persons with Disabilities
> Utah State University
>
> ***************
> On Wednesday, January 08, 2003 you sent:
> RS> I have some .asp pages that are using JScript to parse the
> code, and in
> RS> implementing popup windows, I am finding that onClick
> produces the new window
> RS> with the size specifications set for the page, whereas
> onSelect ignores
> RS> these. Below is the code for the function as well as the
> code used to call
> RS> the functions.
> RS> function NoteWindow(url,name,h,w) {
> RS> var new_win;
> RS> var features > RS> 'height=' + h + ',' +
> RS> 'width=' + w + ',' +
> RS> 'top=' + 10 + ',' +
> RS> 'left=' + 10 + ',' +
> RS> 'toolbar=' + 0 + ',' +
> RS> 'location=' + 0 + ',' +
> RS> 'statusbar=' + 0 + ',' +
> RS> 'menubar=' + 1 + ',' +
> RS> 'resizable=' + 'yes' + ',' +
> RS> 'scrollbars=' + 1;
> RS> new_win = window.open(url,name,features) ;
> RS> new_win.focus();
> RS> }
>
> RS> <a href="note-glossary.asp#ce"
> onclick="NoteWindow('note-glossary.asp#ce','glossary',
> RS> 375,300);return false;" target="_blank" title="Link opens in
> new window">Carotid
> RS> Endarterectomy</a>
>
> RS> <a href="note-glossary.asp#cabg"
> onSelect="NoteWindow('note-glossary.asp#cabg','glossary',
> RS> 375,300);return false;" target="_blank" title="Link opens in
> new window">Coronary
> RS> Artery Bypass Graft</a>
>
> RS> I know that in order to make the event device-independent, I
> should use
> RS> onSelect, but does anyone know what needs to be done to make
> this have the
> RS> new window open with the desired dimensions?
>
> RS> Thanks,
> RS> Ruth
>
>
>
> ***************
>
>
> ----
> To subscribe, unsubscribe, or view list archives,
> visit http://www.webaim.org/discussion/
>
>



----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/