|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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" Forgot to mention... version is VS2005
AnalogKi***@gmail.com wrote: Show quoteHide quote > 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" 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. <AnalogKi***@gmail.com> wrote in message Show quoteHide quote news:1150474212.265933.290700@i40g2000cwc.googlegroups.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" > Marina Levit [MVP] wrote:
> I am guessing the debugger is interfering with focus. In general, when I see... thanks.> using the debugger in any type of application, all sorts of events can be > interrupted or changed just because the debugger is there. > |
|||||||||||||||||||||||