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

  • From: "Roger Woolgrove" <rawoolgrove@xxxxxxxxx>
  • To: <program-java@xxxxxxxxxxxxx>
  • Date: Sat, 9 Apr 2011 10:28:26 +0100

Hi Pamela,

I have no idea why java script is doing this.  Does it happen in all jsp files 
or only a few.  If only a few then there maybe a problem with the script, if it 
happens to all then probably your settings or something complicated in the 
bowels of the computer.
The all experts website is what I believe is an excellent resource particularly 
with programmoing issues.

Roger


  ----- Original Message ----- 
  From: William & Pamela 
  To: program-java@xxxxxxxxxxxxx 
  Sent: Friday, April 08, 2011 8:38 PM
  Subject: [program-java] Re: OT - Javascript question? 


  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: