Forum Moderators: open

Message Too Old, No Replies

How do i insert a tab within a list box

         

Andrew Thomas

2:50 pm on Dec 12, 2002 (gmt 0)

10+ Year Member



Code

<option value="<%=(rs_processor.Fields.Item("component_description").Value)%><%=(rs_processor.Fields.Item("component_price").Value)%>"><%=(rs_processor.Fields.Item("component_description").Value)%>£<%=(rs_processor.Fields.Item("component_price").Value)%></option>

how do i get a tab space between the description and price

eg

20Gb Hard Disk £15.00

within the list box?

thanks

Andrew Thomas

4:12 pm on Dec 12, 2002 (gmt 0)

10+ Year Member



can anyone help me on this, its a bit of a nightmare - not even sure if its possible?

tried & vbtab & and everything else

help

txbakers

4:27 pm on Dec 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure where you want the tab. In the value section? or the display? If it's the display, you can't include tabs because they don't exist in HTML. The best you can do is &nbsp;

If it's in the value, I still wouldn't use tabs, but some type of delimiter. I generall use the pipe "¦" to delimit more than one db value in the value attribute, then have a function to parse the parts when I need to.

Andrew Thomas

4:31 pm on Dec 12, 2002 (gmt 0)

10+ Year Member



It was for the display

so the prices are aligned with one another within the list box.

eg

prod1 £10.00
prod2 £10.00
prod3 £30.00

all within one list box

thanks

RossWal

7:32 pm on Dec 12, 2002 (gmt 0)

10+ Year Member



You might have luck adding enough &nbsp chars to padd it out, like:

for i = 1 to maxProductLength - length(thisProduct)
response.write("&nbsp")
next i

I don't know how the browser will render the multiple &nbsp chars, it might strip them out :(. You could try in plain HTML to make it look nice, then write the asp code to create the HTML.