Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

No scrolling in text input after uppercase ?

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,
Here's goes another lamentation of mine ...
I'm testing a simple input text such as this :

<input type=text name=text size=20 maxlength=30 onKeeUp=toUpCase(this)>

(sorry i replaced onkeyup to onkeeup, coz i cant post with the onkeyup)
where the function toUpCase is this :

function toUpCase(input) {
input.value = input.value.toUpperCase();
}

What i want is, as i type, the characters get upper-cased .. They work fine until the characters type exceeds the size of the input field (not yet exceeding the maxlength). In normal situation without the upper-casing, the input will scroll to the end of the string.

But in firefox 1.5 / netscape 7.1 i used, it doesnt scroll, the text get appended to the last string but the last char is not visible. (omigosh, so hard explaining it )

My friend said that it works fine on IE ..

Pls helppp ...
 
Jhun Hoon
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still cant achieve what i want, helpp ..

Please try this in firefox / netscape 7.1


[ December 29, 2005: Message edited by: Jhun Hoon ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should be using onkeypress and you should have return true; as the last line in your function.

Eric
 
Jhun Hoon
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Sorry, i mis-edited the html .. The return true; should be in the jscript function. =p

If i use onkeypress or onkeydown, it'll scroll smoothly unlike the onkeyup, but with 1 catch, the last character i entered doesnt get uppercased.

I've already tried the combination of onkeypress, onkeydown, onkeyup with/without the return value, etc

Nothing works.. T_T
It seems so simple ...
 
Jhun Hoon
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Any ideas folks ? T_T ...
Sorry to repost out of desperation, lol
 
reply
    Bookmark Topic Watch Topic
  • New Topic