473,748 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling the default selection of buttons in a form

Please Help,
I have a form with multiple buttons "New User", "Delete User", "Save"
buttons, when I access the form it selects the "New User" button by default,
so when you hit the return key ("keyboard") it goes directly to "New User"
form.
My question is:
How could I disable the default selection so that when I access the form
none of the buttons is selected until I click on it myself?
Many thanks in advance.
Regards
Lamine
Nov 19 '05 #1
1 1239
Hi Lamine,

you should be able to just put

onload="this.fo cus()"

in the body tag of your aspx page.
Or if you would like to focus on something else use

document.getEle mentById('IDofT heControl').foc us()

ASP.Net tells you the ID's you controls will get with myControl.Clien tID,
that way you could focus on a different button.

Hope this helps
Johannes

"Lamine Darbouche" <la******@mpt-ltd.com> schrieb im Newsbeitrag
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Please Help,
I have a form with multiple buttons "New User", "Delete User", "Save"
buttons, when I access the form it selects the "New User" button by
default,
so when you hit the return key ("keyboard") it goes directly to "New User"
form.
My question is:
How could I disable the default selection so that when I access the form
none of the buttons is selected until I click on it myself?
Many thanks in advance.
Regards
Lamine

Nov 19 '05 #2

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

Similar topics

8
2015
by: lawrence | last post by:
I'm a beginner with Javascript and especially cross-browser Javascript. I got this working in IE, but not in Netscape 7. It seems like, in Netscape, every time I click on a button, the focus shifts to that button, so there is no text to be selected. What should I do? Below you'll see some code that I have in one of my forms. I was hoping to have these buttons and when I click on them they would take selected text from a textarea box and...
15
3322
by: lawrence | last post by:
Is this the correct way to test for a method before I use it? createRange() is, I believe, an IE only method. function wrapSelectionInTag(selection, tag) { if (document.selection.createRange) { var range = document.selection.createRange(); if (range.parentElement() == element) range.text = '<' + tag + '>' + range.text + '<\/' + tag + '>'; }
5
5054
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main form record. In each page of the tab control, there are three buttons: Add, Update, Delete. Any of these buttons will open another, smaller form to add, update or delete the related data record. Originally, I had placed the smaller form such...
3
1720
by: Mike | last post by:
That is exactly what I am looking for. Just one thing, after I turn the cursor into a wait cursor, is there a way to disable all the controls (e.g buttons, textboxes) so that I can't click on anything, or do I have to disable each control individually. Again , thanks for the reply. >-----Original Message----- >Mike, >
5
5431
by: Wonder | last post by:
How can I create or use the msgobx to show a message without a default button. The user has explicity to click on the button, so the msgbox closes it. Thanks,
1
4391
by: mssbass | last post by:
In order to disable the previous and next buttons on my form, I followed the attached code. The buttons seem to work fine except for one thing. When the form first opens, the next button is disabled; however, if you click on the forward arrow on the scroll bar and click the previous button which takes you back to the 1st form, the next button is now enabled! What am I doing wrong? I just need the next button to be ENABLED when I open...
9
6431
by: dozingquinn | last post by:
Hello, I have a combo box on a form that I would like to 'lock' the selection of after the user makes a selection, then either moves to the next record or saves the form. This selection will therefore be unable to be changed afterwards. From my research, I'm assuming that the following code needs to be placed into form_current event somehow: Private Sub PHIconsultantcombo_LostFocus() PHIconsultantcombo.Locked = (PHIconsultantcombo.Text...
0
8983
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9359
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9310
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9236
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6072
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4592
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2206
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.