| Author |
No scrolling in text input after uppercase ?
|
Jhun Hoon
Greenhorn
Joined: Nov 19, 2001
Posts: 28
|
|
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
Joined: Nov 19, 2001
Posts: 28
|
|
I still cant achieve what i want, helpp .. Please try this in firefox / netscape 7.1 [ December 29, 2005: Message edited by: Jhun Hoon ]
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
You should be using onkeypress and you should have return true; as the last line in your function. Eric
|
 |
Jhun Hoon
Greenhorn
Joined: Nov 19, 2001
Posts: 28
|
|
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
Joined: Nov 19, 2001
Posts: 28
|
|
Any ideas folks ? T_T ... Sorry to repost out of desperation, lol
|
 |
 |
|
|
subject: No scrolling in text input after uppercase ?
|
|
|