Forums

ASP

This topic is locked

Can't show item more than once -- Please Help!

Posted 17 Jan 2003 21:16:11
1
has voted
17 Jan 2003 21:16:11 Anonymous User posted:
I'm pulling the cutline and alt text for an image from (NewsPhoto.Fields.Item("ItemCutline".Value). It works for the alt text (comes up with the full cutline text), but nothing displays for the actual cutline below the photo.

The ASP is :

<td><a href="<%=(NewsPhoto.Fields.Item("ItemPhotoURL".Value)%>"><img src="<%=(NewsPhoto.Fields.Item("ItemThumbURL".Value)%>" alt="<%=(NewsPhoto.Fields.Item("ItemCutline".Value)%>" name="LeadPhoto" width="200" border="1" id="LeadPhoto" /></a></td>
</tr>
<tr>
<td><p class="Cutline"><%=(NewsPhoto.Fields.Item("ItemCutline".Value)%> Photo by <%=(NewsPhoto.Fields.Item("PhotogName".Value)%>, <%=(NewsPhoto.Fields.Item("PhotogBillet".Value)%>.</p>
</td>

But the HTML sent to the browser is:

<TD><A href="/Images/scout/scoutphoto_05dec02.jpg"><IMG id=LeadPhoto
alt="A Landing Craft, Air Cushioned from Assault Craft Unit 5 passes an 80-foot-long blue whale carcass that washed ashore Oct. 10 near ACU-5 south of White Beach at the mouth of Cockleburr Creek. It's the first blue whale — the world's largest living thing — to wash up on base since anyone can remember, according to Bill Berry, a wildlife biologist here. One whale washes aboard the beach every three years on average, but they're usually gray whales, Berry said. Representatives of the National Marine Fisheries Service took samples from the whale to determine its identity. The beast sits away from training and recreation areas, so it was left on the beach to decompose naturally. The whale was dead for as long as two weeks before washing ashore, Berry said. Left, a part of the whale's skeleton."
src="/Images/scout/scoutphoto_thumb_05dec02.jpg" width=200 border=1
name=LeadPhoto></A></TD></TR>
<TR>
<TD>
<P class=Cutline>Photo by John Raifsnider, Sports
Editor.</P></TD></TR></TBODY></TABLE>

I call for that information twice, but it only displays once! Please help!

Why be difficult when you can be impossible?

Replies

Replied 23 Jan 2003 11:11:19
23 Jan 2003 11:11:19 Guenther Kraibacher replied:
Hi!
You have to change the cursor type at the recordset to -dynamic-!

Try it, it should work.

Bye
Guenther
Replied 23 Jan 2003 11:39:34
23 Jan 2003 11:39:34 Owen Eastwick replied:
It's easier to assign the recordset value to a variable, then you can use the variable as many times as you wish on the page. It's also more efficient as you aren't wastefully getting the same data from the data source.

For example:

<% varItemCutline = NewsPhoto.Fields.Item("ItemCutline".Value %>
<td><a href="<%=(NewsPhoto.Fields.Item("ItemPhotoURL".Value)%>"><img src="<%=(NewsPhoto.Fields.Item("ItemThumbURL".Value)%>" alt="<%= varItemCutline %>" name="LeadPhoto" width="200" border="1" id="LeadPhoto" /></a></td>
</tr>
<tr>
<td><p class="Cutline"><%= varItemCutline %> Photo by <%=(NewsPhoto.Fields.Item("PhotogName".Value)%>, <%=(NewsPhoto.Fields.Item("PhotogBillet".Value)%>.</p>
</td>

Regards

Owen.

---------------------------------------------------
Used programming books and web development software for sale (UK only):
www.tdsf.co.uk/Shop.htm

Multiple Parameter UD4 / Access 2000 Search Tutorial:
www.tdsf.co.uk/tdsfdemo/

Reply to this topic