Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] [JavaScript ] keypress problem


  • From: lists at gazelasport.sk (M)
  • Subject: [Javascript] [JavaScript ] keypress problem
  • Date: Sun Oct 15 04:51:19 2006

only focused elements get keypress events. You can't focus DIVs. For
opera it's enough to have cursor over the element.

Bernu Bernard  wrote / nap?sal(a):
> Hi list,
> In the following code, I get the alert box message in Opera. 
> No message in Safari, FireFox, Camino.
> What am I doing wrong ?
> 
> <body>
> <div id="text" style="width:150px ; height : 100px ; padding : 0.2em ;
> background-color : #aaa ; " 
> onkeypress="alert('keypress');">hello</div>
> </body>
> 
> Bernard
>