[program-java] Re: OT - Javascript question?

  • From: "William & Pamela " <pmcoats00@xxxxxxx>
  • To: <program-java@xxxxxxxxxxxxx>
  • Date: Fri, 8 Apr 2011 15:38:40 -0400

I was pointed to the below JS as contributing to my problem, which I will
try to explain. 

 

When I need to edit or update a field by inserting a word in the middle of
the field, every time I enter 1 character the cursor jumps to the end of the
field and I have to keep moving the cursor back to the insertion point in
the middle of the field I'm editing. 

I have to keep doing this for every character I want to enter. 

I don't know JS that well, but any suggestions would be appreciated. 

I will look into Roger's suggestion of googling "sigte all experts" (don't
understand that google search exactly), 

and getting a copy of JS for dummies. 

 

Thanks, 

Pamela 

 

----- JavaScript code ----- 

 

function uppercase(textField)

{

if (textField.value == '')

{

return;

}

var val = textField.value;

var upper = '';

var len = val.length;

for (var i = 0; i < len; i++)

{

if (/^[a-z]{1}$/.test(val.charAt(i)))

{

upper += val.charAt(i).toUpperCase();

}

else

{

upper += val.charAt(i);

}

}

textField.value = upper;

}

 

----- 

 

 

From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Corbett, James
Sent: Friday, April 08, 2011 8:00 AM
To: 'program-java@xxxxxxxxxxxxx'
Subject: [program-java] Re: OT - Javascript question? 

 

Well Java script is also part of this list so fire away.

 

Jim 

 

  _____  

From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of William & Pamela 
Sent: April 7, 2011 21:01
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: OT - Javascript question? 

I know this is for Java questions, so could someone knowledgable in
Javascript please contact me offline? 

My e-mail is: 

pmcoats00@xxxxxxx 

 

Thanks, 

Pamela 

 

Other related posts: