Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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.
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
Report Offensive Follow Up For Removal
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
Report Offensive Follow Up For Removal
![]() |
![]() |
![]() |

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