shortcut

J

julian_m

(I've been told in alt.html that this problem is related to javascript)

How should I do to implement a shortcut inside a page. For instance,
whenever one presses "C" key inside Gmail site, "compose mail" page
appears inmediately. The same happens with many other shortcuts Gmail
has...

Could somebody tell me where should I start?

regards - jm
 
J

julian_m

julian_m said:
(I've been told in alt.html that this problem is related to javascript)

How should I do to implement a shortcut inside a page. For instance,
whenever one presses "C" key inside Gmail site, "compose mail" page
appears inmediately. The same happens with many other shortcuts Gmail
has...

Could somebody tell me where should I start?



I found a site which has what I was looking for:
http://www.wsabstract.com/javatutors/javascriptkey3.shtml

But I need to modify it. The problem is that I can't trap the "r" key

What's the problem?


<script type="text/javascript">
function p_shortcut(e){
var unicode=e.keyCode? e.keyCode : e.charCode
if (unicode==72){
alert('r was pressed');
}
}
document.onkeypress=p_shortcut
</script>


regards - jm
 
E

Evertjan.

julian_m wrote on 04 apr 2006 in comp.lang.javascript:
How should I do to implement a shortcut inside a page. For instance,
whenever one presses "C" key inside Gmail site, "compose mail" page
appears inmediately. The same happens with many other shortcuts Gmail
has...

What use is it having many shortcuts open "compose mail"??????????

;-)

===========

Please see:

<http://www.cs.tut.fi/~jkorpela/forms/accesskey.html>
 
T

Thomas 'PointedEars' Lahn

julian_m said:
(I've been told in alt.html that this problem is related to javascript)

It is not really.
How should I do to implement a shortcut inside a page. For instance,
whenever one presses "C" key inside Gmail site, "compose mail" page
appears inmediately. The same happens with many other shortcuts Gmail
has...

Could somebody tell me where should I start?

<URL:http://www.w3.org/html4/interact/forms.html#adef-accesskey>

Script-based solutions will not work without script support, this will.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top