473,500 Members | 1,898 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with focus() method and input text.


Hello group,

I'm having a problem with an HTML element performance. When I use
focus() method to jump to an input text. I realize the cursor is on
waiting on the 2nd column waiting for user to enter a number. This is
the HTML part:

<input id="id_Text_Octet1" type=text value="" maxlength="3"
onkeyup="SomeFunction(event, this.id);" style="border:0;width:
25px"><span style="font-size:18px;">.</span>

Then in JavaScript there is line of code:

document.getElementById("id_Text_Octet" + 1).focus();

Always user must press backspace in order to be able to type three
digits.

I will appreciate it if somebody could give me a hand in this.

regards,
ak

May 3 '07 #1
2 1893
On May 3, 11:29 am, amit <amit.ko...@gmail.comwrote:
Hello group,

I'm having a problem with an HTML element performance. When I use
focus() method to jump to an input text. I realize the cursor is on
waiting on the 2nd column waiting for user to enter a number. This is
the HTML part:

<input id="id_Text_Octet1" type=text value="" maxlength="3"
onkeyup="SomeFunction(event, this.id);" style="border:0;width:
25px"><span style="font-size:18px;">.</span>

Then in JavaScript there is line of code:

document.getElementById("id_Text_Octet" + 1).focus();

Always user must press backspace in order to be able to type three
digits.

I will appreciate it if somebody could give me a hand in this.

regards,
ak

Got solved.

Thanks!
May 3 '07 #2
On May 3, 12:29 pm, amit <amit.ko...@gmail.comwrote:
Hello group,

I'm having a problem with an HTML element performance. When I use
focus() method to jump to an input text. I realize the cursor is on
waiting on the 2nd column waiting for user to enter a number. This is
the HTML part:
Always user must press backspace in order to be able to type three
digits.
use the select method before focus
May 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4052
by: ra | last post by:
Hi I can't figure this out - I have a routine that is triggered after a text field is changed and if an error it displays an alert message and should put focus back to the field in error but...
4
2200
by: Nitin | last post by:
Hi I have created function to check date and time. at the time of execution, if date is left empty the function returns the error message but then the focus goes to next field. Next filed is for...
6
4825
by: MickG | last post by:
Hi, I am trying to validate these values, this seems to work fine for the phone number and name but I am trying to get the program to fail to submit and set the focus on the date when 2006 is...
6
2008
by: joe | last post by:
Hi Everyone, could anyone comment on the following problem: I have a textbox being appended to a cell in a table, and am trying to call focus() on like this: <snip> c01.removeChild(answerbox);...
3
1625
by: Marc Llenas | last post by:
Hi there, I'm stuck on a validation function for a form and I cannot figure out what the problem is. The page is in ASP. Any ideas? The function being called is: <script...
3
6871
by: VA | last post by:
t=document.getElementById('mytable') is a HTML table with some input fields in its cells Why doesnt t.getElementsByTagName('tr').firstChild.focus; put the focus on that text field? It...
1
2221
by: avnrao | last post by:
Hi, I am facing a problem with control.focus (javascript). Here is the description of the issue. 1. I have 2 aspx files. on Aspx1 I have button named NewRow. Clicking on this, will redirect...
1
2002
by: sravani1 | last post by:
This code runs like when i submit the form it takes the image and displayed and top of the image a map will displayed. But actually i want that when i give the image it checks the location in the map...
2
2994
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
2
2195
coolv
by: coolv | last post by:
Hello I have problem in my page that the dropdown box is not displaying data according to selection of first dropdown.Please help me. Below is my code. thanks.............. <?php ...
0
7136
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
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7232
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...
1
6906
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.