473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Can i configure FireFox browser to act like IE when key is pressed?

Hi, is there any way i can configure firefox so that when i press the ENTER key i can catch through javascript the event.keyCode==13? Perhaps identifying the browser agent and then make some configurations? It would be a dream come true.
Thanks even for reading this.
Sep 3 '10 #1
1 1415
Frinavale
9,735 Expert Mod 8TB
You can.
In FireFox event.keyCode doesn't exist though, you should use e.charCode instead.

This code works in all browsers:
Expand|Select|Wrap|Line Numbers
  1. function ASCIIKeyPressValue(e) {
  2.     var keynum;
  3.     if (e.charCode != null) {
  4.         keynum = e.charCode;
  5.     } else if (e.keyCode != null) {
  6.         keynum = e.keyCode;
  7.     } else if (e.which != null) {
  8.         keynum = e.which;
  9.     }
  10.     return keynum;
  11. }
-Frinny
Sep 3 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: prasaddevivara | last post by:
I am using the outerHTML property to modify the HTML of existin elements in a web page in Internet Explorer. But same outerHTM property is not working in firefox browser, Anybody can tell me a...
6
by: Andreas Klemt | last post by:
Hello, when I use <asp:label font-size="16px" text="Hello World" runat="server" /> and run FireFox Browser the output of "Hello World" is not in Size 16px. The size will be ignored and I can...
0
by: Diffident | last post by:
Guys, I am trying to embed "call back" mechanism into a textbox. Everything seems to be working fine with IE browsers but when it comes to FireFox browser there is an interesting behavior. ...
1
by: RonY | last post by:
I have a dropdown which calls SetTimePeriod method on change the selection. In the JS function, I reset the field style.display based on what the selection is. This works fine with IE but not working...
2
by: psanjay | last post by:
Hi, Am unable to open javascript SaveAs dialog box in Firefox browser. Following is the script, <a href="javascript:void(0);" onclick="document.execCommand('SaveAs',false,'*.xyz');">Save this...
1
by: p8000 | last post by:
This browser seems to have so many problems. One more: I try to have this Fire browser (version 2.0.0.1) as Not default, but so far, without success. How can I have this browser as not default...
9
by: vighnesh | last post by:
Hi Folks Greetings to you all. I have been dealing a project, in which one of the requirement is to clear FireFox browser history programatically. Can anybody suggest me, how this can be...
1
by: Tigger | last post by:
Hi$B!$(Beverybody I programed a web control using C# and htc. I only allow user input the number in my control.I tested in IE6,it is good.But i tested in firefox2.0,the htc had not loaded by...
1
by: Rakhi | last post by:
hello i want to alter the download settings of mozilla firefox browser using javascript of my application !! wat is happenin in my application is, on calling a method , it make a file ready...
2
by: SaraswathiIndirarajan | last post by:
I need to run python script in firefox browser. I followed the steps mentioned in this site (Configuring the Apache Web Server to Run Python on Windows) to configure apache to run python scripts in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.