HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 10th, 2004, 11:51 AM
wzhao wzhao is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 64 wzhao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 11 m
Reputation Power: 5
text field problem

I have a text field which is supposed to get the area code of the telephone number of the users. It's something like this:

<input NAME="areacode" TYPE="TEXT" SIZE="3" MAXLENGTH="3" >

when it shows up on browser, it seems the text field is bigger than 3, even if I set it as maxlength="3".

Can anybody here tell me how to format it to be exactly 3 without extra space on the browsers?

Thanks

Reply With Quote
  #2  
Old August 10th, 2004, 12:10 PM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
Just set SIZE="1" for a tighter fit.
Code:
<input NAME="areacode" TYPE="TEXT" SIZE="1" MAXLENGTH="3">

Reply With Quote
  #3  
Old August 10th, 2004, 12:23 PM
wzhao wzhao is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 64 wzhao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 11 m
Reputation Power: 5
it still doesn't fit very well

Reply With Quote
  #4  
Old August 10th, 2004, 01:30 PM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
I tried out with size="1" and it fit perfect. What browser are you using?

Reply With Quote
  #5  
Old August 10th, 2004, 02:03 PM
wzhao wzhao is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 64 wzhao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 11 m
Reputation Power: 5
in both IE and Netscape, it doesn't fit very well.

Reply With Quote
  #6  
Old August 10th, 2004, 06:13 PM
coinhunter's Avatar
coinhunter coinhunter is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: Battle Creek, Michigan
Posts: 352 coinhunter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 30 sec
Reputation Power: 5
Send a message via Yahoo to coinhunter
I just tried it with all of my browsers and here are the results:
  • Internet Explorer(version 6): Perfect Fit
  • Netscape(version 7.1): Perfect Fit
  • Firefox(version 0.92): Perfect Fit
  • Opera(version 7.1): No Fit: Only shows 1 number
  • Mozilla(version 1.6): Perfect Fit

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > text field 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 4 hosted by Hostway