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!

randomize

Status
Not open for further replies.

leahyj

MIS
May 5, 2004
107
US
Hi,

I have an asp function that is called that uses the randomize function, but

I only want it to randomize the first time the page is loaded.

My problem is that it is randomized after I resubmit the page on a dropdown that reloads the page.

How can I get it to just randomize the first time the page loads?

Thanks.
 
create a flag and set it to 0 so that it wont execute the random function again...

flag =1
if flag then
'call random function
end if

inside random function after generating the random number set the flag to 0

-DNG

 
What do you mean by "the first time the page is loaded?"

Do you mean once per user visit experience or just once ever?
 
Sheco,

What I mean is once per pageload before it loses the focus to another page.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top