You are here: Re: SELECT OPTION and width « HTML « IT news, forums, messages
Re: SELECT OPTION and width

Posted by Jukka K. Korpela on 08/30/07 07:14

Scripsit msaladin:

> I cannot provide you with the real page,

Or anything really resembling it. But can you learn how to post to Usenet?
Hint: not quoting or paraphrasing _anything_ is not the right way.

> the important facts remain
> valid: IExplorer truncates the OPTION-tag to the same width as the
> SELECT-tag.

Not really. It just ignores your CSS setting for an option element. But if
this is an important fact, why do you insist on creating that problem?

> What I want to do is to provide the user with two
> different ways to specify on which server he wants to execute a task:
>
> a)
> The user knows the servername, he can enter it in the textbox.

Fine, you have a textbox then. For clarity, it is best to keep it on a
separate line in the form, preceded by its label. Don't forget to make it
reasonably wide, since server names can be fairly long, especially if they
are fully qualified domain names.

> b)
> The user does not know the servername, he will use the SELECT-box.

That may or may not work. If there are 1,000 options, it won't. But by
trying to truncate the width of the select element (at least initially) to
something that cannot possibly contain a typical name, you almost guarantee
that it won't work for 10 options either.

> Once the user has selected an OPTION, the OPTION-value is inserted in
> the textbox (via Javascript).

Why?? You don't need anything like that. Just pass the choice as a form
field and make the form handler use it. You have the issue of deciding what
to do if a choice has been made (to detect this, the select element should
contain an initially selected option indicating that no choice has yet been
made) _and_ the text input field is not empty. But that's manageable, and
you could even use client-side JavaScript to detect - when possible - this
as soon as the user makes a wrong move.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация