JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 31st, 2005, 07:30 AM
goangus goangus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 4 goangus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 57 sec
Reputation Power: 0
Firefox problem

Hi,

I've written this function to automatically change input to upper case, it works in IE but not firefox can anyone help?

Code:
function upper(){
var result=window.event.keyCode;
var resultChar = String.fromCharCode(result);
resultChar = resultChar.toUpperCase();
frmMember.postcode.value += resultChar;
return false;
}

Reply With Quote
  #2  
Old August 31st, 2005, 11:01 AM
MichaelSoft MichaelSoft is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Location: The Netherlands
Posts: 121 MichaelSoft User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 20 sec
Reputation Power: 4
Why do you want to do it like that?
It is much more easier to convert it on submittal of the form, or when your script accepts the form...

Reply With Quote
  #3  
Old August 31st, 2005, 11:23 AM
goangus goangus is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 4 goangus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 36 m 57 sec
Reputation Power: 0
I've actually managed to sort it but the reason is, I need to check each key stroke for certain combinations i.e if the user types 'BFP' a check box is automatically checked etc and on submit the results are concatenated depending on the outcome. It's simpler for the user if it's done in real time rather than having to click submit over and over

Reply With Quote
  #4  
Old August 31st, 2005, 12:20 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 549 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 7 h 3 m
Reputation Power: 4
keypress vs onsubmit

You do not need to test every keypress. You can test for "in string" and process the form's data "on submit" so that
Quote:
Originally Posted by goangus
on submit the results are concatenated
and it will only need to be submitted once.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Firefox problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT