Set fixed sys font in listbox

H

harry

I'm trying to use a list box to contain several pieces of info per item.

Apart from separating each bit with "," (which looks really messy due to
nothing's in line!), the only way I can think of is to set the font to fixed
sys & padd each field to a fixed width. I've created a ccs style & applied
to the listbox which works, only trouble now is as there appears no way
(absolutely staggering!!!!!) to set the width of the box, loads of the info
is not shown (chopped off)!

Is there a better/smarter way of creating a scrolling list which you can
select etc...

Any ideas?

thanks

harry
 
J

Jukka K. Korpela

harry said:
I'm trying to use a list box to contain several pieces of info per
item.

Stop trying, and re-analyze the original problem.
Apart from separating each bit with "," (which looks really messy
due to nothing's in line!), the only way I can think of is to set
the font to fixed sys & padd each field to a fixed width. I've
created a ccs style & applied to the listbox which works, only
trouble now is as there appears no way (absolutely staggering!!!!!)
to set the width of the box, loads of the info is not shown
(chopped off)!

Sounds very confused, so confused that you forgot to specify the URL.

My crystal ball says that you are trying to present the options in a
select element so that their content are somehow tabulated. The key to
the issue is that select elements are _by definition_ form fields
containing a set of elements with _plain text_ content. If you don't
want that, don't use select.
Is there a better/smarter way of creating a scrolling list which
you can select etc...

Yes, write a list of links. It can be scrolled in a browser window.

If this does not address the problem, then there's something in the
problem that you didn't specify.
 
H

harry

thanks for replying so quick - what I'm trying to do is -

1. The users select various search criteria & hit a query button on one
screen.

2. The search results are displayed on another, there might be 0-50+
depending on search criteria specified.

3. The user then scrolls though the list, each line contains summary
info (5 fields), needed to locate the correct record.

4. Once found the user clicks the "edit" key which then displays the
full record's details on another page which they can update & save

thanks

harry
 
T

Toby A Inkster

harry said:
Is there a better/smarter way of creating a scrolling list which you can
select etc...

<form action="order.php">
<div style="height:2em ; width:auto ; overflow:scroll">
<table border="1" width="90%">
<thead>
<tr>
<th>&nbsp;</th>
<th>Item Number</th>
<th>Item Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="radio" name="item" value="1"></td>
<td>001</td>
<td>Foo</td>
</tr>
<tr>
<td><input type="radio" name="item" value="2"></td>
<td>002</td>
<td>Bar</td>
</tr>
<tr>
<td><input type="radio" name="item" value="3"></td>
<td>003</td>
<td>Baz</td>
</tr>
</tbody>
</table>
</div>
</form>
 
J

Jukka K. Korpela

harry said:
2. The search results are displayed on another, there might be
0-50+ depending on search criteria specified.

OK, make them a list, or a table. You don't need a select element.
3. The user then scrolls though the list, each line contains
summary info (5 fields), needed to locate the correct record.

Well, you could make it a table, if the entries share the same
structure. A tabular presentation might be useful especially if you
expect users to scan through columns to find something special.
But the way to create a table is a <table> element, and you cannot put
a said:
4. Once found the user clicks the "edit" key which then
displays the
full record's details on another page which they can update & save

You could include a column into the table, containing just
<input type="submit" name="some-unique-id" value="Edit">
But it sounds like you could just make the key field a normal link.
After all, it would just show a page, so a link would be suitable - and
the linked page in turn would contain a form.

I think we know that. Please quote properly in future. Hints:
http://www.cs.tut.fi/~jkorpela/usenet/dont.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top