You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jeff Born <jb...@gr.com> on 2002/10/15 21:56:54 UTC

logic:iterate adds lines to the html consumed by the browser?

I have the following line

<tr valign=bottom><logic:iterate name="headerLinks" id="headerLink"
scope="request" property="links"><td valign="bottom"><A
HREF="/ics/<bean:write name="headerLink" property="baseHref"/>.do"><img
valign="bottom" alt="<bean:write name="headerLink" property="altText"/>"
border=0 src="/ics/images/<bean:write name="headerLink"
property="baseHref"/>_off_tab.gif"
onmouseover="this.src='/ics/images/<bean:write name="headerLink"
property="baseHref"/>_off_m_over_tab.gif';"
onmouseout="this.src='/ics/images/<bean:write name="headerLink"
property="baseHref"/>_off_tab.gif';"/></A></td></logic:iterate></tr>

which when included with no spaces dumps the images at the bottom of the cell
where I want them.

However if I format the line like so:
<tr valign=bottom>
  <logic:iterate name="headerLinks" id="headerLink" scope="request"
property="links">
    <td valign="bottom">
      <A HREF="/ics/<bean:write name="headerLink" property="baseHref"/>.do">
        <img valign="bottom" alt="<bean:write name="headerLink"
property="altText"/>" border=0 src="/ics/images/<bean:write name="headerLink"
property="baseHref"/>_off_tab.gif"
onmouseover="this.src='/ics/images/<bean:write name="headerLink"
property="baseHref"/>_off_m_over_tab.gif';"
onmouseout="this.src='/ics/images/<bean:write name="headerLink"
property="baseHref"/>_off_tab.gif';"/>
      </A>
    </td>
  </logic:iterate>
</tr>

I get about 10 pixels of space.  Looking at the generated html the only big
difference is when the code is formatted the logic:iterate inserts hard
returns into the listing.

Thanks,

jb
    

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>