Sunday, August 8, 2010

Get event keycode in both Firefox and Internet Explorer

This solution should work in both IE and Firefox.

JS -

function getCharCode(event)
{
var charCode = (event.which) ? event.which : event.keyCode;

// Might want to get the character representation of the Unicode keycode -

var character = String.fromCharCode(keycode);


}

HTML -

Just put an onkeypress="getCharCode(event)" event handeler in your input code (textarea, whatever)

14 comments:

Anonymous said...

tune hotel prices hotels, leading hotels, search hotels hotel vacation hotel las vegas deals, hotel alberghi, hotel cafe swan hotel g hotel, gateway hotel, hotel alberghi buy viagra online next day delivery buy cheap viagra without prescription, buy viagra online usa airlines reviews hotel deals discount, business class airline, housing news

Anonymous said...

It seems as if [url=http://www.activebody.pl]kreatyna[/url] gives your body what it needs. While using M Stak I have increased the number of times at the gym per week AND did triathlon training at an increased level as well! The fatigue of the muscles workout seems to be reduced ...

alina said...

Barrister Global Services Network, one of premier provider of IT solutions, printer repair , Printer Service, managed print services, Barrister Global Services. Printing services as printer repair and Managed Print Services are among the best services provided by barrister.

Anonymous said...

Hi, i just want to say hello to the community

Anonymous said...

Be close at hand money respecting the most challenging and rewarding taste of your life. Obtain unsurpassed loyal humanness hazard to teach you for a hasten in filmmaking, acting correct layer, screenwriting, producing, cinematography, 3D spirit or lyrical theatre. You can enroll in a short-term workshop or throw away [url=http://univ-prog.disl.org/] buy cialis[/url] limerick, two or three years dedicated to perfecting your technique, in proclivity to of fitting reading books and attending lectures.

buy generic cialis online said...

Well worth to read this article, thanks for sharing this information. With this article you offered me got a chance to know about this, anyway i say Great Article! and waiting for you next article about this interesting subject.

Jessica said...

Barrister Global Services Network Complaints

buy generic viagra said...

I am very much glad to visit your blog..I need this event code..thanks you so much for writing and sharing this code with us!!

How to Lose Weight Fast said...

Good to visit your blog as I get to know good things here especially this code. Thnaks

D said...

Thank u again Andrew for ur tips they are great generic xenical

Anonymous said...

unlock iphone 4
iphone 4 unlock
how to unlock iphone 4

http://emergenturbanism.net/2010/04/how-our-planning-process-prevents-real-planning http://myspeccy.com/en/games/horace-goes-skiing
I have tried downloads, on a variety of computers, which run everything from Windows 95, right up through XP. On every computer that I have ever tried, I have tried to stay on "safe" sites, such as Download.com, to download operations programs, screensavers, and so on (Download.com is just an example, of dozens of so-called web-sites I have tried). Wouldn't you know it, though. At evewry single site, that I can mention, I have brought back viruses, worms, and "tons" of spy-ware. And this is from the "clean", "safe", web-sites. I know that the best hackers can penetrate any connection, including D.S.L., dial-up, and any other connection, to inject bad codes into home computers. How can internet users "safely" use the internet, without having to worry about hackers, and corporations, "injecting" garbage into our computers? Any suggestions would be appreciated.
unlock iphone 4 how to unlock iphone 4

unlock iphone 4 [url=http://unlockiphone44.com]unlock iphone 4[/url] unlock iphone 4 how to unlock iphone 4

Dave said...

These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post, writing is simply great, thank you for the post penis enlargement penis enlargement pills VigRX Plus

Developers.Guide said...

Really Useful..
Thanx..

By :Manojbardhan2009@blogspot.com

SteveBrad said...

I am loving this information so much.Please keep such kind of the information in the future also!!!
Caverta|Edegra|Forzest