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

JavaScript focus() function not working in "start without debugging"

I have the following line of code in my start/login page:

document.getElementById("txtLogin").focus();

When I run the website app through F5 (Debug, Start Debugging) it works
fine (ie, focus on txtLogin). When I run with CTRL+F5 (Debug, Start
without debugging) the focus defaults to the URL box.

Can anybody unveil the mystery ?

Thanks.

Keywords: javascript focus dotnet .net debug "stOOpid problem"

Jun 16 '06 #1
3 2117
Forgot to mention... version is VS2005

AnalogKi...@gmail.com wrote:
I have the following line of code in my start/login page:

document.getElementById("txtLogin").focus();

When I run the website app through F5 (Debug, Start Debugging) it works
fine (ie, focus on txtLogin). When I run with CTRL+F5 (Debug, Start
without debugging) the focus defaults to the URL box.

Can anybody unveil the mystery ?

Thanks.

Keywords: javascript focus dotnet .net debug "stOOpid problem"


Jun 16 '06 #2
I am guessing the debugger is interfering with focus. In general, when
using the debugger in any type of application, all sorts of events can be
interrupted or changed just because the debugger is there.

<An*********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I have the following line of code in my start/login page:

document.getElementById("txtLogin").focus();

When I run the website app through F5 (Debug, Start Debugging) it works
fine (ie, focus on txtLogin). When I run with CTRL+F5 (Debug, Start
without debugging) the focus defaults to the URL box.

Can anybody unveil the mystery ?

Thanks.

Keywords: javascript focus dotnet .net debug "stOOpid problem"

Jun 16 '06 #3

Marina Levit [MVP] wrote:
I am guessing the debugger is interfering with focus. In general, when
using the debugger in any type of application, all sorts of events can be
interrupted or changed just because the debugger is there.

I see... thanks.

Jun 19 '06 #4

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

Similar topics

5
by: Jeremy Langworthy | last post by:
Hi I have two "totals" inputs whose values are dynamically calculated. For obvious reasons I don't want users to be able to edit the information in these. However, I do want this total passed to...
3
by: Jurgen Oerlemans | last post by:
Hello , I use the following to write to a file: FileOpen(1, FileName, OpenMode.Output) ' Open file for output. WriteLine(1, TextBox11.Text) WriteLine(1, "Test text") FileClose(1) In the...
0
by: The Last Danish Pastry | last post by:
A couple of days ago there was a thread "Returning the machine epsilon". The responses in that thread suggested using Double.Epsilon or Single.Epsilon. Since both these seem to return zero I...
2
by: Andrew | last post by:
VS.net Win 2k3 I'm getting the following error when attempting to debug. I'm not debugging remotely, just a local project. "Unable to start debugging. Cannot find port. Check the remote...
0
by: Stefan De Schepper | last post by:
Dear NG, I created a gridlike usercontrol. When clicking on a cell a textbox (or other control, depending on the cell's editortype) is shown. When some other control gets the focus, the textbox...
0
by: LBeveridge | last post by:
Hi, This morning I installed Visual Studio 2005 side-by-side 2003. The first problem I've noted is that projects in 2003 that have "Start External Program" set don't do that. I'm creating a...
1
by: Nick Ward | last post by:
Hey, I'm writing an app using C# visual studio express edition. When i run it in debug mode it runs fine and works perfectly, but when i run it without debugging (or from explorer) it crashes and...
0
by: active | last post by:
Sometimes when I After I click "Start Debugging" I get a "File not Found" Exception. Could not load file or assembly 'FormTesting, Version=1.0.2646.36738, Culture=neutral, PublicKeyToken=null'...
0
by: Curious | last post by:
Hi, I try to set up debugging environment in Visual Studio 2003. So I open the Properties of the project and select "Debugging". I'll need to at first enter "C:\Program Files\AutoTrade\MyTools...
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:
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
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...

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.