Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2005, 06:45 AM
Authorized User
 
Join Date: Feb 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default .showmodaldialog and field focus

Hi

New to ASP and Javascript so be gentle if this is a stupid question.

I have an asp page that is used for user confirmation (ID/Password) that is called at various points in a web application based on an intranet.

The page contains two input fields, user id (defaulted to current user) and password and two buttons (accept and cancel)

I am trying to give focus to the password field on load and have a single line javascript function called "onload=" as

document.opcheck.txtPassword.focus();

The issue I am having in inconsistency with actually gaining focus in the password field.

Using my own machine as server and client I cannot get focus in the field. By dialing onto a customer site and running the exact same software, the focus in the password field on load is obtained. If the users on the site try they do not get the focus (This is the reason for testing and this thread).

The only difference I have noticed is that on my machine I do not get a status bar at the bottom of the dialog box but using the software on site I do (using the default for status).

Other testing involved adding a window.alert in the onload function before the ...focus line. If the alert is removed quickly then I do not get focus, if the alert remains for a few seconds then focus is obtained.

I cannot give a link etc to test as all the software/DB is intranet based although I have tried to supply as much information as possible. If there is any thing I have missed please let me know.

Any ideas or avenues of testing would be appreciated.

Thanks in advance

Darren
(IE 6 SP2, IIS 5.1, ASP)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Set focus on a particular field after server side vinodonline2000 ASP.NET 2.0 Basics 1 March 6th, 2008 09:15 AM
Determining what field has focus? firefighter2045 Access VBA 4 November 6th, 2007 12:58 PM
Set Focus to Field in User Control Ron Howerton ASP.NET 1.0 and 1.1 Professional 3 March 14th, 2006 05:53 PM
Focus on a text input field fizzerchris Classic ASP Basics 0 December 16th, 2005 09:20 PM
Keeping the focus on a field lguzman Access VBA 7 April 20th, 2005 10:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.