473,383 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Select tag how do i set length in mozilla?

Hi,
Check out this page,
http://www.abertron.co.uk/select.htm
How on earth do I shorten the box it but keep the same text. I've tried
a few javascript files but they only work with ie. Has anyone seen an
example somewhere or know how to do it.
The WC standards doesn't have a function to shorten the box it just goes
to the size of the text which I can't understand why. I would use a
different method but I just can't for my particular task.

Any ideas?

Thanks

Gary

Jul 20 '05 #1
5 9820
Gary Mayor <ga**@abertron.co.uk> wrote:
Check out this page,
http://www.abertron.co.uk/select.htm
How on earth do I shorten the box it but keep the same text. I've tried
a few javascript files but they only work with ie. Has anyone seen an
example somewhere or know how to do it.
The WC standards doesn't have a function to shorten the box it just goes
to the size of the text which I can't understand why. I would use a
different method but I just can't for my particular task.


Set the width in CSS.

select {width: 20em;}

However this will hide the right hand end of the text from users of
some browsers, so it may be better to rewrite your content so that you
don't need to include such long options.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

"Gary Mayor" <ga**@abertron.co.uk> wrote in message
news:bv**********@newsg3.svr.pol.co.uk...
Hi,
Check out this page,
http://www.abertron.co.uk/select.htm
How on earth do I shorten the box it but keep the same text. I've tried
a few javascript files but they only work with ie. Has anyone seen an
example somewhere or know how to do it.
The WC standards doesn't have a function to shorten the box it just goes
to the size of the text which I can't understand why. I would use a
different method but I just can't for my particular task.


1. Why would you want your users not to be able to see the full text of the
choices? Don't you think a list would look funny like this:

Afgha
Alban
Andor
Angol
Antig
Argen
Armen
Austr
Austr
Azerb
Baha
Bahrei
Bangl
Barba
...

? Also, note the failure to distinguish Austria from Australia.

2. Formatting is done with stylesheets, not script.

Jul 20 '05 #3
My users will be entering there own text and it needs to be able to
allow them to enter as much text as they want and it needs to come out
using a select box.
I'm looking into the CSS method if it works in ie and mozilla then it'll
do for me.

Thanks

Gary

Jul 20 '05 #4
On Tue, 27 Jan 2004 23:38:49 +0000, Gary Mayor <ga**@abertron.co.uk> wrote:
My users will be entering there own text and it needs to be able to
allow them to enter as much text as they want and it needs to come out
using a select box.
I'm looking into the CSS method if it works in ie and mozilla then it'll
do for me.

Thanks

Gary


My guess as to what you're after:

You're going to solicit user text through a textarea or an input
type="text". Then you're going to display it in a select box, presumably
using JS?

Still not sure what the problem is. Your Select box will size to the text
entered. If it's a lot of text, the select box will be wide like in your
example. If you want to limit the size, use the JS to truncate the string.

If you want them to enter as much text as they want and it is going to be
an option in a Select box, then why would you complain that the box is too
long? If you're allowing unlimited characters, theoretically the select
box would run off the edge of the page. That's what happens with long
values.

I assume you'd like the text to wrap, but it doesn't work that way. Select
options are one line high. Wrapping would lead to confusion. It's not a
bug, it's a feature.
Jul 20 '05 #5
Gary Mayor <ga**@abertron.co.uk> wrote:
My users will be entering there own text
You can't enter text into a select box.
and it needs to be able to
allow them to enter as much text as they want and it needs to come out
using a select box.
What does "it needs to come out using a select box" mean? I still
don't get why they would want their text to be chopped off like that.
I'm looking into the CSS method if it works in ie and mozilla then it'll
do for me.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pasquale | last post by:
Hello, I wondering if there is a way to dynamically update a select list with javascript from a database query without having to reload the page to update the list?
1
by: comp.lang.javascript | last post by:
Using IE5.5+, is it possible to hide options in a select? The following doesn't work: <HTML> <HEAD> <STYLE> SELECT OPTION.orgA{ display:none } .orgB{ display:inline } .orgC{ display:none }
3
by: Max Weber | last post by:
Try to run the code below in a page. You will notice than when you switch the multiple attribute of the SELECT tag, only one option is displayed as selected although multiple options have ben...
1
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
4
by: Marek Mänd | last post by:
This seems an IE issue only: 4253 bytes testcase: http://www.hot.ee/idaliiga/testcases/ieselect/bnlinkingselectinmsie.htm Can one have 1) a mouseover/mouseout element on TBODY 2) change in...
4
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird....
6
by: Amer Neely | last post by:
I have a page showing dynamic generation of a SELECT box using JavaScript. See http://www.softouch.on.ca/dynamic.html. Using Mozilla et al, choosing an option from both lists will result in the...
2
by: mark4asp | last post by:
Why does this not work in Mozilla ? <http://homepage.ntlworld.com/mark.pawelek/code/animals.html> The optHabitat_change() event does not fire. What am I doing wrong here? PS: It should...
4
by: Matt Ratliff | last post by:
Hello, I would appreciate any assistance you have with the following problem: I have (as an example) an array of values as follows: arrayvalues=new Array("0001","0003","0005") where each is the...
7
by: srt5k | last post by:
I have a web page with 2 html multiple select boxes on it, and I use javascript to dynamicaly copy options from one box to another, before deleting the option from the first box. My issue is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.