• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic