• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

ASP: Help Needed

Winchester

Diamond Member
In their code: Text

Response.Write "<TD>" & objRS.Fields("FamilyPicture") & "</TD>"


FamilyPicture in my DB is family.jpg, how can I put the IMG SRC stuff around it in this case.


How it works before looking at the above suggestion:

<a href="gallery.asp?Start=0&Offset=15&LastName=<%=RS("LastName")%>"><IMG SRC="http ://www.website.net/images/(<%=RS("FamilyPicture")%>" id="IMG1" onclick="return IMG1_onclick()"></a>


I tried the following but I get an syntax error with the "</TD>"

Response.Write "<TD>" & "<IMG SRC=""" & objRS.Fields("FamilyPicture") & """ WIDTH=""98"" VSPACE=""5"" HSPACE=""5"" BORDER=""0""> & "</TD>"




Figured out if I leave out the "</TD>" it works....????? wierd still need info on adding the URL to the whole thing.


How does this convert?
 
Maybe I misunderstand the question, but can't you just output the html tags for additional columns?

response.write("<td>" & "<img src=" & recordset("url1") & ">" & "</td>" & "<td>" & "<img src=" & recordset("url2") & ">" & "</td>")
 
Whatever the ASP version of this is:

for(int i = 0; i < num_pics; i += num_cols){
print "<tr>";
for(j = 0; j < num_cols; j++){
print "<td>pics[i+j]</td>"
}
print "</tr>";
}

It's not that hard.
 
Here is one I did recently. The #if($count==3) is what determines how many images per row. This isn't ASP but the logic is the same.

#set($count=0)
<tr>
#foreach($picture in $cms.links("/weather/gallery",1,20))
<td><a href=URL>PICTURE HERE</a></td>
#set($count=$count+1)
#if($count==3)
</tr>
#set($count=0)
#end
#end
 
Need help with this part though:

In their code:

Response.Write "<TD>" & objRS.Fields("FamilyPicture") & "</TD>"


FamilyPicture in my DB is family.jpg, how can I put the IMG SRC stuff around it in this case.


How it works before looking at the above suggestion:

<a href="gallery.asp?Start=0&Offset=15&LastName=<%=RS("LastName")%>"><IMG SRC="http://www.website.net/images/<%=RS("FamilyPicture")%>" id="IMG1" onclick="return IMG1_onclick()"></a>



How does this convert?
 
I tried the following but I get an syntax error with the "</TD>"

Response.Write "<TD>" & "<IMG SRC=""" & objRS.Fields("FamilyPicture") & """ WIDTH=""98"" VSPACE=""5"" HSPACE=""5"" BORDER=""0""> & "</TD>"




Figured out if I leave out the "</TD>" it works....????? wierd still need info on adding the URL to the whole thing.
 
GOT IT:

Response.Write "<TD><a href=""member.asp?Start=0&Offset=15&LastName=" & objRS.Fields("LastName") & """>" & "<IMG SRC=""" & objRS.Fields("FamilyPicture") & """ WIDTH=""124"" VSPACE=""5"" HSPACE=""5"" BORDER=""0"">" & "</a>"
 
Back
Top