473,624 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pressing shift +tab does not give focus to previous (disabled) field

4 New Member
hi guys.
i am facing one issue. For one text box field i have used fillowing code.
---------------------------------------------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. function fnCheckNreStatus() {
  2.     if(document.getElementsByName(boName+".CustomerNREFlg")[0].value == "N") {
  3.         document.getElementsByName("3_AccountBO.DateOfBecomingNRE")[0].value='';
  4.         setNextComp (boName+'.StaffFlag');
  5.     }
  6.  
-------------------------------------------------------------------------------------------------------
now if i am pressing shift +tab as setNextComp this method is used, the last field is not getting focused but the next one.
what should i do int his case if i want to focus last field.

PLEASE HELP ME..
Oct 19 '07 #1
8 4324
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Wat does setNextComp do? Can you show the code for it?
Oct 19 '07 #2
sudha412
4 New Member
Welcome to TSDN!

Wat does setNextComp do? Can you show the code for it?
---------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. function setNextComp (compName){
  2.             if(compName != null){
  3.                 document.getElementsByName(compName)[0].focus();
  4.             }
  5. }
  6.  
---------------------------------------------------
in this three text boxes are involved. say for first text box i am selecting value from dropdown as "N" then the code i mentioned will disable the second textbox and move focus to next text box i.e. third textbox.
situation is if now i want to go back by pressing shift +tab..the second text box is checking the condtion and as code is written to move focus to next field (setNextComp) it is not going back to 1 textbox.

thanx in advance .. :)
Oct 19 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
You've disabled the second text box, so how can it have focus?
Oct 19 '07 #4
sudha412
4 New Member
You've disabled the second text box, so how can it have focus?
ya . i know but in this case how will i do it. ?

thnx. :)
Oct 19 '07 #5
acoder
16,027 Recognized Expert Moderator MVP
ya . i know but in this case how will i do it. ?
Enable the field. That should allow it to receive focus.
Oct 19 '07 #6
acoder
16,027 Recognized Expert Moderator MVP
Changed the thread title to better describe the problem.
Oct 19 '07 #7
sudha412
4 New Member
Changed the thread title to better describe the problem.

(Sorry guys i should have given all requirement info in my first post itself.as i am new in this world so it happned.)

the requrement is that the textbox should be disabled if user is selecting 'N' from previous field (dropdon) and focus should be moved to next tab..so to do this after selecting i am disabling this field and focus is shifted to next textbox. now if iam doing shift tab i am not able to focus this disabled tab.as earlier i had selected "N" and setNext method is called to focus next textbox.
Oct 22 '07 #8
acoder
16,027 Recognized Expert Moderator MVP
the requrement is that the textbox should be disabled if user is selecting 'N' from previous field (dropdon) and focus should be moved to next tab..so to do this after selecting i am disabling this field and focus is shifted to next textbox. now if iam doing shift tab i am not able to focus this disabled tab.as earlier i had selected "N" and setNext method is called to focus next textbox.
Once you've given focus to the third textbox, enable the second one again. This will allow you to focus on it when pressing shift+tab from the third text box.
Oct 22 '07 #9

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

Similar topics

44
4701
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the body of the page I put the next code: <BODY onkeydown='notOpenNewWindow();'>
4
9514
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab pages (one page at the end for collecting identifying information) on my form. To ease the task for the user, I'd like to have an automatic movement to the next page. For instance, when the user clicks on the choice for Question 4 (the last of...
10
27840
by: Tim Frawley | last post by:
I am attempting to detect a Shift+Tab in the KeyPress event for back navigation on a control that doesn't support this method. Does anyone have any ideas how to compare e.KeyChar to a ShiftTab? Tim
2
1608
by: UJ | last post by:
How do you set the icon for when somebody presses Shift-Tab ? I have already set the application icon and the form icon but they aren't showing up in Shift-Tab. TIA - Jeff
7
7190
by: Csaba Gabor | last post by:
I'd like to detect the shift key when a button is "clicked" in Firefox/Mozilla. If the button is clicked with the mouse, no problem. However, if the onclick event is keyboard originated, then my method is not working. Same thing for SELECT elements. The simple web page below shows the issue. Click with the mouse while holding down the shift key, and the Shift key's status registers. However, use Shift+Alt+o, or either (while the...
3
5403
by: Patrick [MSFT] | last post by:
Let me preface this with the goal I'm trying to achieve is mimic a feature of another language (Dexterity used by Microsoft Dynamics) and so while a filling a drop down list is a workable solution I'd rather do it like Microsoft Dynamics does and use separate textbox and lookup button. What I have is, simply, is a C# winform, a textbox and a pushbutton. On the textbox, on the validating event of the textbox I check my customer table...
4
7618
by: nkoier | last post by:
Hi, I've been going crazy trying to figure out what's wrong with our Asp.Net 2.0 intranet site. At the very top of our main page I provide a TextBox and a Button for submitting Google searches. Recently somebody pointed out to me that you can't just press ENTER anymore after typing in the TextBox but that you HAVE to click on the submit Button WITH THE MOUSE for it to work. After some initial troubleshooting I discovered that it's only...
0
967
by: Jason Kester | last post by:
Silliest question ever: Had the disaster scenario in VS.NET yesterday. Fired up the IDE, only to find that I could no longer un-tabbify sections of code by selecting them and SHIFT+TABbing. TAB still tabbifies, but there's no untabbifying to be had. Adding to the fun, VS.NET's keyboard shortcut editor will accept any keystroke but TAB in its "type here to assign shortcut" field. TAB moves focus to the next control. SHIFT+TAB moves...
0
8240
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
8175
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8625
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
8336
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
8482
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...
1
6111
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2610
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
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.