Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Response Clear Issue
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 03 June 2008 :  20:38:22  Show Profile
I'm trying to recreate the animated CAPTCHA routine used by a PHP program. Here's what I have:


<%
Randomize
Pic1 = Int(Rnd * 9)
strPic1 = " images/ani/" & Pic1 & ".gif"
Randomize
Pic2 = Int(Rnd * 9)
strPic2 = "images/ani/" & Pic2 & ".gif"
Randomize
Pic3 = Int(Rnd * 2) + 1
	if Pic3 = 1 then
		strPic3 = "images/ani/minus.gif"
	end if
	if Pic3 = 2 then
		strPic3 = "images/ani/plus.gif"
	end if
	if Pic3 = 3 then
		strPic3 = "images/ani/times.gif"
	end if
strPic4 = "images/ani/equals.gif"
strPic5 = "images/ani/solve.gif"
Response.Write	"<table width=""158"" height=""50""  cellspacing=""0"" cellpadding=""0"" border=""1"" align=""center"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td>" & vbNewLine
Response.Write "<img src=""" & strPic1 & """ border=0>"
Call Delay
Response.Clear
Response.Write "<img src=""" & strPic3 & """ border=0>"
Call Delay
Response.Clear
Response.Write "<img src=""" & strPic2 & """ border=0>"
Call Delay
Response.Clear
Response.Write "<img src=""" & strPic4 & """ border=0>"
Call Delay
Response.Clear
Response.Write "<img src=""" & strPic5 & """ border=0>"
Call Delay
Response.Write	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table>" & vbNewLine
Response.End

Function Delay
	Randomize
	DelTm = Int(Rnd * 2) + 1
	TT = timer
		do until timer-TT> DelTm
 			' do nothing
		loop
end Function
%>

Now, if I include a response.flush in the delay routine, I get the entire series of images in a long cell - not what I want. I want each to display in the cell, clear and get replaced with the next after the delay.

If I do not include the response.flush in the delay, I get nothing until the final image.

Anyone have a tip?<

HuwR
Forum Admin

United Kingdom
20600 Posts

Posted - 04 June 2008 :  01:51:21  Show Profile  Visit HuwR's Homepage
asp does not work like that, if you want some sort of image rotator you need to use javascript<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.34 seconds. Powered By: Snitz Forums 2000 Version 3.4.07