Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Hey all,

I'm trying to figure out a way to dynamically get a picture loaded from the images directory and put a dynamic url to a picture on photobucket.

I'm half way there.

I have things set up so that the name of the picture column i.e. 'ASM129' will add a "s.jpg" to put in the column. Which works fine.

However, when I try to set a similarly dynamic hyperlink to my photobucket folder, the link works (an opens in a new window like it should) but then the picture won't load in the column. It shows a little empty box that you can click on that takes you to the photobucket picture.

How can I set this up so that I can have the picture from my local images folder appear AND link to the dynamically assigned url to photobucket.

It appears to only do ONE of them at a time. Below is my code:



VB
<%
DO WHILE NOT oRs.EOF
on error resume next%>

<tr>
<td class=Comics align="center"> <% Response.Write("<a href=http://i770.photobucket.com/albums/xx341/jump_ace/Comics/" & oRs.Fields("Picture") & "L.jpg" & " target='blank'>" & "<img src=images/" & oRs.Fields("Picture") & "s.jpg></a>")%></td>
<td class=Comics align="center"> <% = oRs.Fields("Title") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Issue") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Grade") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Signature") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Serial") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Publisher") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Category") %></td>
<td class=Comics align="center"> <% = oRs.Fields("Box") %></td>
</tr>
<% oRs.MoveNext %>
<% Loop %>
<% DbObj.Close 
SET DbObj = Nothing 
%>



UPDATE - From what I can tell, it's not parsing the second 'oRs.Fields("Picture")' for some reason. When I go to try and download the jpg, it's trying to download 'localhost/image/S.jpg instead of localhost/images/(Picture column name)s.jpg.

Is there a way I can make it parse both 'oRs.Fields("Picture")' fields?


Thanks for any insight you can give me!


Jerome
Posted
Updated 8-Jul-12 11:18am
v2

1 solution

Had to make a second 'oRs2' connector, now it works.

Like this:

<td class=Comics align="center"> <% Response.Write("<a href=http://i770.photobucket.com/albums/xx341/jump_ace/Comics/" & oRs.Fields("Picture") & "L.jpg" & " target='blank'>" & "<img src=images/" & oRs2.Fields("Picture") & "s.jpg></a>")%></td>



Jerome
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900