Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

word wrap within script

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
Hi

I have the following script which is selecting distinct manufacturers from a Access Database.
The problem is, as a couple of the manufactureres are about 60/70 characters long, the list box created is huge! I want it to be a fixed width size, wrapping the text if needbe or even missing some of the text off (as long as they can see the first 30 characters or so I'm happy)

code is below
Any help much appreciated

Response.write &quot;<select name = 'Manufacturer'>&quot;
Response.write &quot;<option value=&quot;&quot;&quot;&quot;>Click to select a manufacturer</option>&quot;

Set myRS1 = Server.CreateObject(&quot;ADODB.Recordset&quot;)
myRS1.Open &quot;SELECT distinct maufacturer from asbestos&quot;, myConn

While not myRS1.EOF
manu = myRS1(&quot;maufacturer&quot;)
Response.write &quot;<option value= '&quot; & manu & &quot;'>&quot;
response.write manu & &quot;</option>&quot;
myRS1.movenext
wend
response.write &quot;</select>&quot;
 
Just get the length and then cut down to 30 chars Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top