Click to See Complete Forum and Search --> : Split dynamic table


gyonis
02-22-2005, 06:35 AM
I've been searching for a solution for this problem for more then a week now, and it's deadline is tomorrow, now I got some hints but the problem that I'm still learning ASP, so if any body could give me detailed answer for this it would be most appreciated, and believe me, I've been searching and trying for the last week.

The problem is that we import information from an Oracle DB and the output comes on an ASP page as table, but because the information is too much (and it's important that all the information is displayed), the table seems endless, what I want to do is to get a code that splits the table's rows, 20 rows on the 1st page then the code split the table, generate a Next>>,<<Back links, creates a new page, put the next 20 rows in it, generate a next, back links, .. and so on till the data ends. Now regardless to any other usability options, this is what they wanna do.

So can some body help me on that with detailed answer please, I really tried every thing and search it out really good, but it's kind of hard when you still in the learning process.

Thanx in advanced.

buntine
02-22-2005, 07:03 AM
This exact thing is detailed very well at asp101.com(.)

Here is the link: http://asp101.com/samples/db_paging.asp

Click the "view the ASP code" image button to see the code for it.

Regards.

gyonis
02-22-2005, 08:57 AM
THANX alot buntine, I've been searching for this for more then a week now, you've saved my life, thanx again.:D

rmalik1
03-20-2005, 12:07 AM
Can this be done with Javascript?

phpnovice
03-20-2005, 08:47 AM
Yes, but why do you think you would need to? To do it with JavaScript, you just have to use ASP code to build a JavaScript data array. Then JavaScript can parcel this data out dynamically, in whatever format desired, from the client side.

rmalik1
03-21-2005, 11:26 AM
Thanks phpnovice for your reply. Actually I cant use ASP, not supported by our web servers. So what I want to do here is to display the first 10 search results on main page and then others in separate pages, just like google, with 10 results shown on every page. Is it possible with Javascript alone?

phpnovice
03-21-2005, 11:35 AM
Originally posted by rmalik1
Actually I cant use ASP, not supported by our web servers.
Since you posted in an ASP forum... :D But, PHP would work as well.
Originally posted by rmalik1
So what I want to do here is to display the first 10 search results on main page and then others in separate pages, just like google, with 10 results shown on every page. Is it possible with Javascript alone?
Do you mean acessing a database for the data? No, server-side code is required for that -- though JavaScript can communicate directly with such server-side code if necessary. Otherwise, all data would have to be coded into a JavaScript data table (an array) so that JavaScript could parse it out into the page ten rows at a time, etc.