从“图像"目录中的SQL链接图片向Photobucket超链接 [英] Hyperlink To Photobucket From SQL Linked Picture In 'Images' Directory
问题描述
大家好,
我正在尝试寻找一种方法,以动态方式从images目录中加载图片,并将动态url放置到photobucket上的图片中.
我在那儿的一半.
我已经进行了设置,以便图片列的名称(即"ASM129")将添加"s.jpg"以放入该列.哪个工作正常.
但是,当我尝试为我的photobucket文件夹设置类似的动态超链接时,该链接有效(一个链接会在新窗口中像应有的那样打开),但是该图片不会加载到该列中.它显示一个小空白框,您可以单击它以将您带到该Photobucket图片.
如何进行设置,以便可以显示本地图像文件夹中的图片,并将其链接到动态分配给photobucket的url.
似乎一次只能执行其中一项.以下是我的代码:
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:
<%
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
%>
更新-据我所知,由于某种原因,它没有解析第二个"oRs.Fields(" Picture)".当我去尝试下载jpg时,它正在尝试下载''localhost/image/S.jpg而不是localhost/images/(图片列名称)s.jpg.
有没有办法让我解析两个"oRs.Fields("Picture")字段?
感谢您的宝贵见解!
Jerome
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
推荐答案
必须制作第二个"oRs2"连接器,现在可以使用了.
像这样:
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)
Jerome
这篇关于从“图像"目录中的SQL链接图片向Photobucket超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!