Computing.Net > Forums > Web Development > ASP-VBScript print tab in select

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ASP-VBScript print tab in select

Reply to Message Icon

Name: lermacs
Date: June 30, 2005 at 07:08:42 Pacific
OS: na
CPU/Ram: na
Comment:

in ASP page, I am trying to response.write a variable with a cancatinated tab between two words. My browser (IE 6.0) doesn't take it (I do see the tab when I view source on my browser).

Code:
<%SelTest = "Test" & chr(9) & "Test2"%>
<%response.Write(SelTest)%>

I am really trying to get a <Select><Option> with a a second field to appear in the option but I am putting the two fields into one asp variable with a cancatinated tab in between but only 1 space will appear. Although the tab will appear in the view source code.

Please either let me know of a workaround with the tab/spaces. I tried cancatinating more than 1 space and the browser won't show it. Or let me know how to get a second field to show in a <Select><option>. Or let me know of another kind of <select> object that I can use that allows for more than one field to appear.

Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: June 30, 2005 at 07:28:24 Pacific
Reply:

In HTML a tab is interpreted as a space. Also, mutiple spaces are interpreted as a single space. The exception is when the content is included within <PRE> tags (there may be a couple others too). In that case all code will be displayed exactly as it is written within the <PRE> tags - multiple spaces, line breaks, etc.

But, the <PRE> tags are for "raw" text. I don't believe you can use them within other tags such as <OPTION>.

You can use non-breaing spaces to create extra space. The character code for a non-breaking space is " " (without the quotes). You can add as many of these together that you want.

Michael J


0

Response Number 2
Name: Michael J (by mjdamato)
Date: June 30, 2005 at 07:33:39 Pacific
Reply:

Hmm... My non-breaking space code was displayed correctly in the preview, but was parsed in the post!

Here is the code for a non-breaking space, I have added spaces between each character so it will not be processed.

"& n b s p ;"

Michael J


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: ASP-VBScript print tab in select

Internet posters creation www.computing.net/answers/webdevel/internet-posters-creation/2611.html

Printing webpage without cropping www.computing.net/answers/webdevel/printing-webpage-without-cropping/1360.html

ASP (or computer) Order Problem www.computing.net/answers/webdevel/asp-or-computer-order-problem/397.html