473,320 Members | 1,856 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,320 software developers and data experts.

JavaScript focus problem when pressing enter in IE

karthickkuchanur
156 100+
Hi,

I have the text one text box and submit button.

i used
Expand|Select|Wrap|Line Numbers
  1.  document.getElementById("find").focus();
to focus the find button when the user enter the value in text box and PRESS enter(With out click).

The value is correcty dispalyed (Filtering)in Fire Fox.

But it is not working for IE.

When i enter the value in text box and make it focus by using tab key for find button ,in this case it working.


Please help me how to make my button to focus correctly for IE ..

Eg : I will enter the value in test and simple press the enter.

Note : it is working in FIRE FOX.
Feb 24 '12 #1
3 2659
acoder
16,027 Expert Mod 8TB
How is this triggered? Can you post some more relevant code?
Feb 27 '12 #2
karthickkuchanur
156 100+
Hi Acoder,

In My HTML page we have the script like <code><script type="text/javascript">
document.getElementById("find").focus();
</script> </code>

So it will focus the find key button.

Below is code for button <code> <td colspan="2" align="right" class="odd">
<input type="submit" class="boton" jwcid="reset@Button" onclick="submitForm(this.form)">Reset</input>
&nbsp;
<input "submit" class="boton" value="Find" jwcid="find@Submit" listener="ognl:listeners.handleSubmitButtonClick"/>
</td> </code>

please reply me if need more info .Thanks
Feb 28 '12 #3
karthickkuchanur
156 100+
Hi,

Expand|Select|Wrap|Line Numbers
  1.   <script type="text/javascript">
  2.        document.getElementById("find").focus();
  3.      </script>  
Whilw laoding the script is get called while the html is loaded, at this time reset button got focus scope (FIREFOX)

Below the button code
Expand|Select|Wrap|Line Numbers
  1. <td colspan="2" align="right" class="odd"> 
  2.           <input type="submit" class="boton" jwcid="reset@Button" onclick="submitForm(this.form)">Reset</input> 
  3.           &nbsp;
  4.            <input "submit" class="boton" value="Find" jwcid="find@Submit" listener="ognl:listeners.handleSubmitButtonClick"/>  
  5.        </td>
Please reply if u want more info. Thanks
Feb 28 '12 #4

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

Similar topics

3
by: Razvan | last post by:
Hello, Can somebody recommend me a Java Script scroller that can scroll an i-frame ? I tried the Tigra scroller (www.softcomplex.com/products/tigra_scroller/) but sometimes it does not...
34
by: kpg | last post by:
Hello all, I have an asp.net web application with tons of Java script files. I would like to protect the Java Script somehow so it can't be seen by a remote user. I found several 3rd party...
2
by: Paul | last post by:
Hi I have some code and java script, when the page initially loads I want it to have focus on dr_tx_names. This works. The page loads a second time with a dropdown selection and in the code...
2
by: Victor | last post by:
Hi, I have a problem with logging into web site via screen scraping. User name and password field contain 'name' property, and therefore I can easily do assignment to them:...
8
by: dbaplusplus | last post by:
I worked on web development using java script many many years, so I am now a newbie to javascript. I have a single html page, which is generated dynamically using some programming language. Web...
7
by: GS | last post by:
we are using the following script for cursor to goto default position, is this script is java script or not?. can somebody tell me. I got this script from Internet, our client told us not to use...
2
by: bobby421 | last post by:
have to validate my web page using java script. I have one dropdown list also . I need a javascript to validate weather any item in dropdownlist is selected or not. e.g ddlDrop is my dropdownlist. ...
1
by: harshavardhan | last post by:
Hi, here is the problem: Consider there are three frames in a HTML page. When I try to print these frames using java script, only the third document is being printed thrice. <HTML><HEAD> <script...
5
by: Ankur | last post by:
Hi Folks, I am new for this group. I want to clarify one thing what's a basic difference between Client Side Java Script and Server Side Java Script. how we can differentiate it. Why we called...
0
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.