|
-
Dec 12th, 2002, 04:29 AM
#1
A link to an image
If I give ubb image tag, like {IMG]something.com/image3324.asp[/IMG]
Now in the ASP page's coding, I choose from several images in an array list and do a Response.Redirect to that image.
My question is, will that image show up, or will it be a red X?
If you haven't understood the question, I can rephrase:
How did Spetnik do that random image thing in his signature?
-
Dec 12th, 2002, 05:06 AM
#2
In a file rndImageTest.asp:
Code:
<HTML>
<HEAD>
<TITLE>Untitled</TITLE>
</HEAD>
<BODY>
<table id = 'testImage'>
<tr>
<td>
<% Response.Write "<img src=rndImage.asp>" %>
</td>
</tr>
</table>
</BODY>
</HTML>
In a file rndImage.asp:
VB Code:
<%
Dim arrImages
Dim arrData
Dim objStream
' Load the images
arrImages = Array("images\firewks1.jpg", "images\firewks2.jpg", "images\firewks3.jpg")
Randomize
intRnd = Int(((UBound(arrImages) + 1) * Rnd))
Set objStream = Server.CreateObject("ADODB.Stream")
With objStream
.Type = 1 ' adTypeBinary
.Open
.LoadFromFile Server.MapPath(arrImages(intRnd))
End With
With Response
.ContentType = "image/jpeg"
.BinaryWrite objStream.Read
End With
Set objStream = Nothing
%>
-
Dec 12th, 2002, 07:18 AM
#3
-
Dec 12th, 2002, 07:41 AM
#4
My pleasure
Any chance for a cash payment?
-
Dec 12th, 2002, 10:06 AM
#5
Originally posted by axion_sa
My pleasure
Any chance for a cash payment?
How about a big fat joint?
-
Dec 12th, 2002, 10:10 AM
#6
Lol - thanks, but no thanks
-
Dec 14th, 2002, 12:07 PM
#7
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|