HighDots Forums  

Re: how can i trigger onChange() when maxlength reached without .. .

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: how can i trigger onChange() when maxlength reached without .. . in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Philip Ronan
 
Posts: n/a

Default Re: how can i trigger onChange() when maxlength reached without .. . - 08-02-2003 , 06:43 PM






On 03.8.2 11:39 PM, noViagraHere wrote:

Quote:
I have a simple text input box in a form

input type="text" name="SRCCODE" size="8" maxlength="6"
onChange="reLoad(this)" value="value"

what i am wanting to do is when someone enters text into this box because it
may be the only info changed on the form, how can i trigger the onchange
function when the user types in the 6th digit of text without having to wait
for the text box to be blurred or tabbed out of?
You must be in a hurry! What happens if you make a typing mistake?

I don't know if this will work, but try it anyway

onkeypress="if (this.value.length==6) reLoad(this)"

Phil

--
Philip Ronan
phil.ronanzzz (AT) virgin (DOT) net
(Please remove the "z"s if replying by email)




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.