WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: onSelect vs. onClick

for

From: Darel Benysh
Date: Jan 8, 2003 11:22AM



I'm fairly certain that the <A> element doesn't have an onSelect attribute.
Therefore, the browser is just launching the document in the href attribute
into the new target window (_blank).

The onSelect attribute is typically for <INPUT> elements.

Darel
--
Darel Benysh, PhD | IBM > eServer > iSeries > User technologies >
Information Center
<EMAIL REMOVED> | 507 253 2607 | T/L 553 2607
Information Center - http://www.ibm.com/eserver/iseries/infocenter
eServer Information Center -
http://www.ibm.com/servers/library/infocenter/infocenter.html



"Ruth Stillman"
<ruth@dendwrite.c To: "WebAim" < <EMAIL REMOVED> >
om> cc:
Subject: onSelect vs. onClick
01/08/2003 11:00
AM
Please respond to
webaim-forum






I have some .asp pages that are using JScript to parse the code, and in
implementing popup windows, I am finding that onClick produces the new
window
with the size specifications set for the page, whereas onSelect ignores
these. Below is the code for the function as well as the code used to call
the functions.
function NoteWindow(url,name,h,w) {
var new_win;
var features 'height=' + h + ',' +
'width=' + w + ',' +
'top=' + 10 + ',' +
'left=' + 10 + ',' +
'toolbar=' + 0 + ',' +
'location=' + 0 + ',' +
'statusbar=' + 0 + ',' +
'menubar=' + 1 + ',' +
'resizable=' + 'yes' + ',' +
'scrollbars=' + 1;
new_win = window.open(url,name,features) ;
new_win.focus();
}

<a href="note-glossary.asp#ce" onclick="NoteWindow
('note-glossary.asp#ce','glossary',
375,300);return false;" target="_blank" title="Link opens in new
window">Carotid
Endarterectomy</a>

<a href="note-glossary.asp#cabg" onSelect="NoteWindow
('note-glossary.asp#cabg','glossary',
375,300);return false;" target="_blank" title="Link opens in new
window">Coronary
Artery Bypass Graft</a>

I know that in order to make the event device-independent, I should use
onSelect, but does anyone know what needs to be done to make this have the
new window open with the desired dimensions?

Thanks,
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/