I have the same problem David had.

I was trying to generate the option list os an option form field. What I did
was :

<option value="1"><%=(String)formRequest.get ("Num")%>
<%=(String)formRequest.get ("Name")%></option>

As a result in the page source code, I obtained :

<option value="1">12Bonjour</option>

instead of
<option value="1">12 Bonjour</option>

which is what is expected to obtain if the spaces are "unsignificant but
preserved".

As someone said before in this thread, it could be normal that spaces in
HTML code are ignored. But here, it is in a form field, and it could be
important. Anyway, the space is not preserved.

All I found to have my space preserved is :

<option value="1"><%=(String)formRequest.get ("Num") + "
"%><%=(String)formRequest.get ("Name")%></option>

which is not very elegant.

As you said Bob, browsers are supposed to colllapse multiple spaces into
one, which is what happens when I try :

<option value="1"><%=(String)formRequest.get ("Num") + "
"%><%=(String)formRequest.get ("Name")%></option>

The printed result is exactly the same as before

So, in a few words, this might be a JRun bug regarding to the specs.

Sylvain

-----Message d'origine-----
De : Foster Bob <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date : lundi 21 juin 1999 02:05
Objet : Re: no spaces - bug in JRun?


>>look at the source to see if it is actually a JRun problem - I do
>>this a lot, and I havn't had a problem with no spaces in the _source_, but
>>the browser does sometimes concatenate the two words.
>
>The HTML 3.2 spec said: "Except within literal text (e.g. the PRE element),
>HTML treats contiguous sequences of white space characters as being
>equivalent to a single space character (ASCII decimal 32)."
>
>HTML 4.0 isn't nearly as clearly written, but a browser that collapsed
>multiple spaces to no space in Latin text would surely be doing it wrong.
>
>What browser do you see this behavior in? I can't repro with IE or NN.
>Could you give a simple example?
>
>Bob Foster
>Symantec Internet Tools  http://www.visualcafe.com/
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to