C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 23rd, 2003, 12:39 AM
Juice Juice is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: India,Bangalore
Posts: 5 Juice User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Focus Problem in Jscript.. IE version 5-5.5

I have a screen where certain textboxes get dynamically enabled or disabled depending on whether a value is entered in one of the textboxes (named TXBORGANISATIONNAME).
The textbox immediately following the Organisation name is a DateOfBirth field which gets disabled on blur event of Organisation name if any value is entered in it (org. name). This disabling is done by a Function organisationNameCheck() which is called onBlur and onChange event of OrganisationName textbox. In this event the focus should go to the next enabled field which is TXBPOSTCODE. But the focus is just lost..How do I get the focus on PostCode.???
Also when I clear the contents of OrgName, DateOfBirth Field is enabled so then the focus should go to DOB ..
For this I need to track the tab event (as in event of mouse click the focus should go to the field where the mouse is clicked) which I am not able to trap within the organisationNameCheck() function as it is called on change or blur events..
I am able to trap the event and code a work-around in IE 6 version.. but it fails in IE 5 &5.5 versions.. Therefore I would like to get solutions for IE 5-5.5 versions at the earliest.

The follwing is a part of my Jsp and Jscript.

<Script language="JavaScript">
function organisationNameCheck() {
if (document.JSP.TXBORGANISATIONNAME.value == "")
{
changeStyleSheetClass(document.JSP.TXBDATEOFBIRTH, 'E'); // Enabling
//TXBDATEOFBIRTH
document.all["LBLTXBDATEOFBIRTH"].className="mainLabel";

changeStyleSheetClass(document.JSP.TXBBANKGIRO, 'E');
document.all["LBLTXBBANKGIRO"].className="mainLabel";

changeStyleSheetClass(document.JSP.LSBSEX, 'E');
document.all["LBLLSBSEX"].className="mainLabel";
}
else
{
changeStyleSheetClass(document.JSP.TXBDATEOFBIRTH, 'D'); // Disabling
//TXBDATEOFBIRTH
document.all["LBLTXBDATEOFBIRTH"].className="mainLabelDisabled";
document.JSP.TXBDATEOFBIRTH.value="";

changeStyleSheetClass(document.JSP.TXBBANKGIRO, 'D');
document.all["LBLTXBBANKGIRO"].className="mainLabelDisabled";
document.JSP.TXBBANKGIRO.value="";

changeStyleSheetClass(document.JSP.LSBSEX, 'D');
document.all["LBLLSBSEX"].className="mainLabelDisabled";
document.JSP.LSBSEX.value="";

}
}
</Script>

<body class="background" onkeydown="javascript: void checkKeyPressed();" onLoad="organisationNameCheck();postCodeCheck();callOnLoad();" text="#000000">
<!-- #BeginEditable "Page Specific Javascript" --> <!-- #EndEditable -->
<form method="post" name="JSP" action='imsearchforclient'>
.
.
.
<td class=mainLabel>
<input type="text" name="TXBORGANISATIONNAME" class="<Process:ClientSearch name="CSS_TXBORGANISATIONNAME_ENB"/>"
value="<Process:ClientSearch name="TXBORGANISATIONNAME" />" onChange ="organisationNameCheck();" onblur="organisationNameCheck();" >
</td>
<td width="10">&nbsp;</td>
<td class=mainLabel>
<input type="text" name="TXBDATEOFBIRTH" maxlength="70" class="<Process:ClientSearch name="CSS_TXBDATEOFBIRTH_ENB"/>"
value='<Process:ClientSearch name="TXBDATEOFBIRTH" />'
</td>
<td class=mainLabel>
<input type="text" name="TXBPOSTCODE" class="<Process:ClientSearch name="CSS_TXBPOSTCODE_ENB"/>"
value="<Process:ClientSearch name="TXBPOSTCODE" />" onChange="postCodeCheck();">
</td>
<td class=mainLabel>
<input type="text" name="TXBBANKGIRO" class="<Process:ClientSearch name="CSS_TXBBANKGIRO_ENB"/>"
value="<Process:ClientSearch name="TXBBANKGIRO" />" >
</td>
<td class=mainLabel>
<select name="LSBSEX" class="<Process:ClientSearch name="CSS_LSBSEX_ENB"/>" >
<Process:ClientSearch name="LSBSEX" />
</select>
</td>
.
.
.
</form>
</body>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Focus Problem in Jscript.. IE version 5-5.5

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap