Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POST question

Status
Not open for further replies.

leahyj

MIS
May 5, 2004
107
US
I have this page that has a security captcha function call generator, but I only want the captcha to change when the page is initally loaded, not when the page does a postback to itself.

Is there a way to handle this, outside of using ajax.

page code
Code:
<%

dim MyResult 

MyResult = GetRandomNumber(Cint(0), Cint(9))

%>

function code
Code:
function GetRandomNumber(lowrange, highrange)

randomize()

GetRandomNumber = Int((highrange - lowrange + 1) * Rnd + lowrange)

end function


My one thought was to somehow only have the randomize function run when I wanted the value to change.


Thanks
 
I found the answer to my own question on another tek-tips posting.

If request.form() <> "" or request.form.count = 0 Then

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top