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

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

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 4314
acoder
16,027 Expert Mod 8TB
Welcome to TSDN!

Wat does setNextComp do? Can you show the code for it?
Oct 19 '07 #2
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 Expert Mod 8TB
You've disabled the second text box, so how can it have focus?
Oct 19 '07 #4
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 Expert Mod 8TB
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 Expert Mod 8TB
Changed the thread title to better describe the problem.
Oct 19 '07 #7
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 Expert Mod 8TB
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
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...
4
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...
10
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? ...
2
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
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...
3
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...
4
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....
0
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. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.