[Javascript] shortcuts
Scott Reynen
scott at randomchaos.com
Wed May 24 09:23:52 CDT 2006
On May 24, 2006, at 9:06 AM, Michael Borchers wrote:
>> On Wed, May 24, 2006 at 03:18:25PM +0200, Michael Borchers wrote:
>>> i want to offer a navigation via shotcuts.
>>> i did it this way so far:
>>> <a href="#" onfocus="javascript:redirectByShortcut('<?php echo
>>> CONTACTS_FILENAME; ?>?select=1');" accesskey="c"></a>
>>> function:
>>> function redirectByShortcut(redirectUrl)
>>> {
>>> top.location.href = redirectUrl;
>>> }
>> Wouldn't it be rather easier and more reliable to just:
>> <a href="<?php echo CONTACTS_FILENAME; ?>?select=1"
>> target="_top" accesskey="c">link text</a>
>
> the links appear somewhere else in a dropdown where i can't
> add a accesskey. that's why i considered to use hidden fields.
> is it possible?
It looks like the accesskey was taken directly from your sample code
and has nothing to do with the change David was suggesting. Do you
have a page on a live server we can look at and see the effect you're
trying to achieve? Currently, it appears you're using JavaScript to
accomplish something that HTML can do just fine.
Peace,
Scott
More information about the Javascript
mailing list