473,564 Members | 2,798 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_Oct et1" type=text value="" maxlength="3"
onkeyup="SomeFu nction(event, this.id);" style="border:0 ;width:
25px"><span style="font-size:18px;">.</span>

Then in JavaScript there is line of code:

document.getEle mentById("id_Te xt_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 1903
On May 3, 11:29 am, amit <amit.ko...@gma il.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_Oct et1" type=text value="" maxlength="3"
onkeyup="SomeFu nction(event, this.id);" style="border:0 ;width:
25px"><span style="font-size:18px;">.</span>

Then in JavaScript there is line of code:

document.getEle mentById("id_Te xt_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...@gma il.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
4055
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 focus or select won't seem to work - the cursor just stays in the next field. Im using IE6.0 The code is like
4
2208
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 time and there is also a check on that. If time is empty return error message. Again the explorer returns error message and then shifts the focus...
6
4837
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 selected and submitted. Thanks in advance for any help.
6
2016
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); answerbox=document.createElement('input'); answerbox.addEventListener("change",check_answer,false); answerbox.style.fontSize=FONTSIZE;...
3
1634
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 language="JavaScript" type="text/javascript"> function checkform ( form ) {
3
6877
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 doesnt give any errors, the focus just doesnt change.
1
2227
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 page to Aspx2 which has a Datagrid. PageLoad of Aspx2 displays the DataGrid with existing data filled in and shows a new row (set of text boxes) in...
1
2010
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 and after displayed it.plz tell that how to start the logic. <?php // Connect to database $errmsg = "";if (!...
2
3002
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 local system that validations work.plz tell that whats the problem in that. Here is my code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0...
2
2207
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 session_start(); if (!isset($_SESSION)) {
0
7665
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.