What you're looking to do is called recordset paging. The way you're trying to do it will not work. Remember how ASP works:
Browser sends request to web server Web server processes request, executes ALL asp code Web server returns HTML to the browser All objects are destroyed on browser, and no connection between the browser and the server exists anymore An "onclick" event is a browser event. The server has no idea that someone is clicking a button in a web page somewhere. If you want data from the server, you must have the browser make another request to the server. IE <button onclick="location.href='getrecord.asp?direction=next¤tID=39';">Next</b utton>. Recordset paging is far from being a trivial task. Take a look at this lengthy FAQ article. http://www.aspfaq.com/show.asp?id=2120 Also, always tell us what DB system you're using! SQL Server? DB/2? Etc. Ray at work > -----Original Message----- > From: Noel N. Reynolds [mailto:[EMAIL PROTECTED] > > > Can someone tell me how to get ASP to accept a request to skip to the > next record or go to the prior record as a result of using a SKIP or > PRIOR button on a html page. When the user clicks on the SKIP > button, the onclick even occurs and the sub is executed. In the sub > I tell ASP to either RS.movenext or RS.moveprior but nothing happens > or I get an error. > > At the top of the ASP page I set up the connection to the database > then I display the first record in a <table> with button at the > bottom of the page to move through the data. > <% > ....... > %> > > Once the user clicks on a button and returns to the ASP code at the > top of the page, how do I access the open recordset to move to the > next record, etc. > > Thanks, > Noel ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/17folB/TM --------------------------------------------------------------------~-> --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/active-server-pages/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
