Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 10-14-2010, 04:00 PM PHP input
Novice Talker

Posts: 8
Name: andy
Trades: 0
How can you get a input box to expand as you type if you exceed X amount of characters?
sch5811 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-14-2010, 05:33 PM Re: PHP input
Knight13's Avatar
Defies a Status

Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
Trades: 0
I personally have never seen an input box do that, did you see that on a website?
Knight13 is offline
Reply With Quote
View Public Profile
 
Old 10-14-2010, 06:48 PM Re: PHP input
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
You can do this with javascript. I'm not a javascript expert but this is how I'd do it:

Add an onkeypress event to the input field. When the event fires check the length of the value and modify the width of the field if the number of characters exceeds a certain limit.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by NullPointer; 10-14-2010 at 06:51 PM..
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 10-15-2010, 01:23 AM Re: PHP input
Novice Talker

Posts: 8
Name: andy
Trades: 0
example - a Facebook status update -
sch5811 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP input
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24632 seconds with 12 queries