Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you autosize a forms text input field?

Status
Not open for further replies.

rsfoley

Programmer
Apr 16, 2002
56
0
0
US
I would like to know if there is a way to autosize a forms text input field. Either by a feature as part of the input tag, or something a little more complicated like figuring out how wide in characters it area is and then set the size.

I don't know. I have a dynamic column in a table, and it can be anysize depending how other stuff in the column. I would like the text field to span the width of the column.

-Rodney Rodney
 
It does not seem to work in IE6. That's okay, I just set it to a size that seems to work in *most* cases.

Thanks for trying. Rodney
 
No 100% is interpreted as just 100 so it sets it to a size of 100 characters.

As for the other not working in IE6 for me... I followed the simple instructions and it's size was just set to what ever the size what set to, there was no "Autosizing" going on. Nothing dynamic, so I do not know what it did on your systems, or that you just say a text field and said it works. But I played with it and changed the size settings, and had a regular text field next to it, and set it's size setting to the same, and they were always both the same size. So it does not work for me it does not autosize anything. Rodney
 
if you don't type anything in it, nothing will happen. it is made to expand as you type.
 
Well Mate, if you check the W3 HTML specs there no support for percentages in the size of an input field. THere for it does not work. It may appear to work, because 100 characters is VERY BIG. But it does not resize the field to to the width of the browser, in any browser. It is not even specific to IE. I checked that on Microsofts MSDN, and in FrontPage 2002.

Plus the JavaScript thing did not work either, and I looked closer at the code, and it does not really do anything. Maybe it used to work a while ago, but it does not really do anything.

This personally is a mute topic for me, since I have implemented a solution, and since I posted the orignal question. This will be my last post, I hope no one else with bother to post in this topic. Rodney
 
Well, i know that you don't want any more posts but I just have to mention a few things.

if you check the W3 HTML specs there no support for percentages in the size of an input field. THere for it does not work.

Do they support Marquee?? That exists..

Plus the JavaScript thing did not work either, and I looked closer at the code, and it does not really do anything. Maybe it used to work a while ago, but it does not really do anything.

Were you looking at the same code as us?? The script DOES work!!

This will be my last post, I hope no one else with bother to post in this topic.

It is so nice to thank people for trying to help you.. We do this of our own free will so we are suggesting ideas, we do not get paid to help you and this is not a helpdesk!!

I am sure that I will jump at the chance to help you again..

Hope this helps Wullie

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top