473,407 Members | 2,326 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,407 software developers and data experts.

Getting automatic focus on first text item just after running programme

vikas251074
198 100+
Can I get automatic focus on first text item just after running programme? Because when I run the programme, there is no focus on any text item at the first instant. I have to use mouse to go to first text item.
So Can I get automatic focus on first text item just after running programme?

Thanks and regards,
Vikas
Jun 3 '08 #1
7 1702
idsanjeev
241 100+
please try

Expand|Select|Wrap|Line Numbers
  1. <form name="myform">Name:  <input type="text" name="fieldname" size=10></form>
Insert into body Tag
Expand|Select|Wrap|Line Numbers
  1.  OnLoad="document.myform.fieldname.focus();"
regards
jha
Jun 3 '08 #2
vikas251074
198 100+
Thankyou sir,

My problem has been solved.
Jun 3 '08 #3
idsanjeev
241 100+
Thankyou sir,
My problem has been solved.
glad you got it working.
Regards
Jha
Jun 3 '08 #4
vikas251074
198 100+
Excuse me sir,

This method does not work for array type inputs text. Suppose, I have four rows for mat, cmp_sr_no, dept_sr_no, qty, wt, rem fields. The number of row is dynamic as per the requirement of user. When this page loads, the focus should be on first row of mat field. How can this be done?

Thanks and regards,
Vikas
Jun 4 '08 #5
idsanjeev
241 100+
Excuse me sir,

This method does not work for array type inputs text.When this page loads, the focus should be on first row of mat field. How can this be done?

Thanks and regards,
Vikas
plese try to replce body tag with

Expand|Select|Wrap|Line Numbers
  1. <body onLoad="document.myform.mno[0].focus();">
Jha
Jun 4 '08 #6
vikas251074
198 100+
Yes sir,
I got it.

Thanks and regards,
Vikas
Jun 4 '08 #7
idsanjeev
241 100+
Yes sir,
I got it.
Thanks and regards,
Vikas
Enjoy
Happy Programming
regards
Jha
Jun 4 '08 #8

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

Similar topics

1
by: reneecccwest | last post by:
hello, is there any way to indicte a cursor on the first text user input when a page loads without using onload in the body tag?
0
by: Dave | last post by:
Hello, I am writing an On-screen keyboard, similar to the one included in windows 2k and XP. The problem I am having is that I need my keyboard to never get the focus, but still be able to...
2
by: Khadim | last post by:
Hi, I am having this problem with my application that it is not getting itself in taskbar by itself.. i m working on this application for 5 months, don't know what happened at what time that its...
1
by: Prasad | last post by:
HI all, <!-- ======== This is the division with width & height set to 100% and z-index to -1 =======- --> <div...
10
by: jayaprakashbojja | last post by:
Hi, I wrote the code to generate a new row each time when i press tab in the second text box in a row of two text boxes. It's working fine. But my problem is in the new row that is created...
2
by: savyatha | last post by:
i have 4 textboxes. after i give some input in the first text box, i need the cursor focussed in the 3rd textbox automatically. plzzzzz any1 help me out how to do this. if possible, give the...
0
by: write2jagdeep | last post by:
i Want to change color of text item when got focus in forms builber d2k and revert that color when lost focus. Pls anser it urgently.
5
by: Academia | last post by:
I use to do this: Dim index As Integer = CType(sender, MenuItem).Index but ToolStripMenuItems do not have an Index property so I can set the Tag or MergeIndex property of those items and use...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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
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
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
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...

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.