BJ,

Yes, there is a way you can do that.  I'm not sure of the exact syntax, but
hopefully you can google this and get a solution:

You need to use the onkeypress event, something like this:

<input type="text" name="whatever" onkeypress="changePeriod();">

Your changePeriod() function should look at the window.event.keyCode (which
is the ascii value of the key pressed) and it matches the ascii value of a
period (46), change it to a tab (9).  Something like this might work:

function changePeriod() {
  if(window.event.keyCode == 46) {
    window.event.keyCode = 9;
  }
}

Try that and see if it works.  I know it will work in IE, but not sure about
other browsers.  

Hope this helps!

Sincerely,

Dave Phillips
http://www.dave-phillips.com


-----Original Message-----
From: BJ McShane [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2008 10:25 AM
To: CF-Talk
Subject: javascript question

I built a form for my users where they enter IP addresses.  They are use to
putting in the .(period) in between the numbers but I built the form so all
they would have to do is type in the number.  Is there a way I can change
the keystroke of a . (period) to a tab.  So when they are typing they could
type in the . but it would tab over to the next field?

thanks for any help,

bj 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310983
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to