You are not logged in.

#1 2005-02-22 15:55:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

silly html question

hey all... got a stupid minor issue that's been bugging me for some time... have a web page, which uses select tags for some data.  The boxes are about as wide as they can be, but the data doesn't like to fit (long strings).  What I'd like to do is give these lists a horizontal scroll bar - however, if you've ever messed with this, the select tag resists all attempts at styling... this means javascript must be employed.

I had, at one point, a div around the select... the div had the overflow property set, and the select box was managed by a javascript function (height and width were set to auto first, then the width was adjusted by 17px (standard scrollbar width)).  This, however, does not work 100% of the time and seemed to cause an odd flicker.... as of now, I've spent too much time attempting this stupid requirement, so I'm going to abandon it...

Does anyone know anywhere where there is a pre-made dhtml widget which I could use (free, of course)?

Offline

#2 2005-02-22 19:44:48

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: silly html question

can you provide an example code snippet of what you are trying to do.
I am having difficulty envisioning it in my minds eye.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-02-22 20:23:41

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: silly html question

cactus wrote:

can you provide an example code snippet of what you are trying to do.
I am having difficulty envisioning it in my minds eye.

I just want to be able to scroll a select list horizontally if the text is too big to fit the defined width...

here.... ascii art kicks ass

EDIT: crappy HTML spacing...

---------------------------------------
|this is option a                      |
|this is option b and the text is reall| (y long and won't fit)
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
|                                      |
----------------------------------------
|< |||||||                         | > |       <---- see option b
----------------------------------------

because of option b, the scrollbar appears on the bottom so you can see the whole text...

this is simple and easy to do in a GUI program, but almost impossible in a web page...

Offline

#4 2005-02-22 20:58:23

Pajaro
Member
Registered: 2004-04-21
Posts: 878

Re: silly html question

whats the point with this?

      <div style="position:absolute; width:50%; height:70px; overflow:auto;">
          <div style="position:absolute;">
              <select>
                  <option>caca</option>
                  <option>culo</option>
              </select><br>
              <select>
                  <option>pedo</option>
                  <option>pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis pis</option>
              </select>
          </div>
      </div>

Offline

#5 2005-02-22 21:15:11

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: silly html question

that's kinda what I'm talking about... however set the size="5" or so on one of the select boxes...

fill it with some data...

it doesn't behave well if, say, the div is large enough to hold 10 items and you have 12 items in the select list... you get double scrollbars and things...

Offline

#6 2005-02-22 21:20:53

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: silly html question

I don't think it is possible. You would have to do a work around.
Either make a custom list box using javascript and css (dhtml) and put in an iframe or something, use a different control (ie radio select), or shorten the strings..

http://www.experts-exchange.com/Web/Web … 60348.html
scroll down past the banners to see what people actually talked about..


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#7 2005-02-22 21:58:39

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: silly html question

cactus wrote:

I don't think it is possible. You would have to do a work around.
Either make a custom list box using javascript and css (dhtml) and put in an iframe or something, use a different control (ie radio select), or shorten the strings..

I think there was some confusion here - I know it's not possible, and I've searched everwhere... I've come across that link before...
I don't have any say in requirements... they just want scrollbars... and I keep saying it's not possible unless you spend some outrageous amount of time making a DHTML widget to do it... I was looking for a good premade one...

http://www.activewidgets.com has something that would work, but that's $1500 for a full license...

I posted here to see if anyone had a premade version of what I was looking for....

Offline

#8 2005-02-22 22:21:46

Pajaro
Member
Registered: 2004-04-21
Posts: 878

Re: silly html question

phrakture wrote:

that's kinda what I'm talking about... however set the size="5" or so on one of the select boxes...

fill it with some data...

it doesn't behave well if, say, the div is large enough to hold 10 items and you have 12 items in the select list... you get double scrollbars and things...

if you use width style property instead of size tag property you don't get annoying scrollbars

Offline

#9 2005-02-22 22:49:15

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: silly html question

phrakture wrote:

I think there was some confusion here - I know it's not possible, and I've searched everwhere... I've come across that link before...
I don't have any say in requirements... they just want scrollbars... and I keep saying it's not possible unless you spend some outrageous amount of time making a DHTML widget to do it... I was looking for a good premade one...

*light goes on over his head*
oh. I see.
Is the select being used for display of data only, or is it being used so people can select the data for interaction?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#10 2005-02-22 22:57:57

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: silly html question

cactus wrote:

*light goes on over his head*
oh. I see.
Is the select being used for display of data only, or is it being used so people can select the data for interaction?

it's the right hand side of one of the standard "from list A, to list B" things with the "<" and ">" buttons - familiar interface for most people...
the left hand side doesn't overflow, but when adding to the right, it adds descriptions instead of what is displayed in the left.... and my idea of just limiting the text got vetoed... so I was trying to find a way to make it display pretty....

Offline

#11 2005-02-22 23:02:29

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: silly html question

hmm...
you could maybe use simpler javascript to have the message scroll inside the box, on its own..
much like the scrolling status bar at the bottom can be made to..
would be kind of wonky from a user's perspective though. I agree that your best bet would be to try finding a premade dhtml iframe that is independent of the normal select box controls.
I did a cursory search, and have been unable to find one. Likely you have searched more thoroughly than I did, already. You might have to end up "rolling your own".

EDIT:
http://webfx.eae.net/dhtml/select/jsGenerated.html
might be a place to start from.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2005-02-22 23:33:13

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: silly html question

cactus wrote:

You might have to end up "rolling your own".

Yeah that's where I was... the thing is the requirement to add "scrollbars" really isn't that big of a deal, so very little time/budget would/should be alotted...
Therefore, I think we're going to scrap the idea and tell the guy "too bad"

Offline

#13 2005-02-23 23:58:08

Pajaro
Member
Registered: 2004-04-21
Posts: 878

Re: silly html question

hey guys,

have you read my post about using width instead of size?

Offline

#14 2005-02-24 03:04:56

dp
Member
From: Zürich, Switzerland
Registered: 2003-05-27
Posts: 3,366
Website

Re: silly html question

can anybody post a screenshot of the _troubling_ thing with code that produces it? ... also provide the version and name of the browser ... or even better: give me the link to the experiment online, so i check myself (debugging such things is really cool)

some notes that were already mentioned but need to be repeated:

- iframes are NOT w3c compliant (they are MS)
- try to work as much as possible without ecma-script
- use "width" correctly
- if your select options are too long, then either
-- your design is wrong
-- your text is too full


The impossible missions are the only ones which succeed.

Offline

Board footer

Powered by FluxBB