...

View Full Version : Problem setting accesskey in IE.



sashaovc
07-02-2006, 05:19 AM
I've tried:

function add(a, b, c)
{
b.onclick=function(){
top.location.replace('?b=' + a + '&e=' + c);
};
b.accesskey='';
window.open('?add=' + a);
d.b.focus();
}
and:


function add(a, b, c)
{
b.onclick=function(){
top.location.replace('?b=' + a + '&e=' + c);
};
b.setAttribute('accesskey','')
window.open('?add=' + a);
d.b.focus();
}

I thought maybe it was because it was passed to a function, but the onclick part of it works... Thank you in advance.

Kravvitz
07-02-2006, 06:18 AM
Where is "d" set?
Why didn't you specify the second argument for replace()?
d.b.focus(); is probably invalid.

Please read Guidelines and Suggestions for Posting on Web Development Forums (http://www.dynamicsitesolutions.com/other/forum_posting_guidelines/).

sashaovc
07-02-2006, 01:18 PM
d is set in the body of the document, and d.b.focus() works because b is a focusable element of form d. The replace() part of it works correctly too; top.location.replace(var) is the same as location.href=var . But please do focus on the accesskey problem. Thanks.

Kravvitz
07-02-2006, 09:12 PM
It's not working because accesskey (all lower-case) is not the same as accessKey (camel-case).

P.S. I forgot about location's replace() method. I was thinking that you were using String's replace() method.

P.P.S. So you didn't read the guidelines and suggestion page?

sashaovc
07-07-2006, 08:45 PM
I read it, but I thought I haVe posted all information pertinent to my bug... Or is that not what you were talking about?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum