G
Guest
Does anyone know of a component, in which one would press a button on apage
and it will return a random answer from a database?
and it will return a random answer from a database?
Does anyone know of a component, in which one would press a button on apage
and it will return a random answer from a database?
Use the Randomize and Rnd function in ASP to get a record ID for say 100 records
<%
Randomize
RecordID = Int((100 * Rnd) + 1)
' Use RecordID in your query string to select the record ID
%>
Problem w/ any client side script is the page has already been rendered
- so it is too late to go back to the server for a DB connection/recordset
If the OP is using a DB, it needs to be done w/ server side script
(if not w/ ASP then probably w/ PHP for non-MS server/DB like MySQL)