Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

how to display next records in html page using javascript

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello ranchers,

i want to display 100 records in sets of only 10 on a html page.

i have put "next" button to go to next 10 records .

can somebody suggest the javascript code for "next" button' ?

shailendra
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually it is done using server code. Your "Next" button submits a form, either get or post, with start index and amount, and server sends what page need.
One more thing - from my experience, users hate "Next" button. They prefer to wait a little longer, but get everything (I dealt with about 500 Mb and up pages, and they wanted it all at once). You can use scrolling in your page to display data.
 
author & internet detective
Posts: 41184
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

One more thing - from my experience, users hate "Next" button. They prefer to wait a little longer, but get everything


You are very lucky that your users have the patience and bandwidth for this.

On the Internet (especially on dialup), users will not wait more than 10 seconds. It's better to get them something back ASAP.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:
You are very lucky that your users have the patience and bandwidth for this.

On the Internet (especially on dialup), users will not wait more than 10 seconds. It's better to get them something back ASAP.



Ditto that, no disrespect to Yuriy but that's a rare circumstance
[ November 23, 2004: Message edited by: John Smith ]
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Funny - you caught me.
I actually forgot about dial up and so called "internet"
Last couple years I am doing B2B software - webapps, intranet, huge pages, high speed, etc.
 
Sheriff
Posts: 67650
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gotta disagree with Yuriy on this one. Any usability study that you might read (and I've waded through a slew of them) will tell you that users are quickly overwhelmed when presented with too much data. My expreiences bear this out as well.

So regardless of connection speed, when faced with large data sets, it's best to use a 2-pronged approach:

1) Provide pagination of data as you are planning (next, previous et al).

2) Provide powerful filter and search tools so that users can quickly find just the relevant segments of data rather than having to wade through piles of it just to find what they really need.
[ November 24, 2004: Message edited by: Bear Bibeault ]
 
shailendra shewale
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank u all for this discussion.
I have found solution for the problem but sorry that i didnt respond earlier.

The solution being using
<input type="hidden" so that during next button press when same form is reloaded with next entries (say 11 to 20) the hidden field is still accessible.

Thankx again
shailendra
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I understand that this is not a point of this discussion. But sinse it kind of starting rolling around of my response about "Next" button.
1. With no disrespect to Bear Bibeault - I hate broad statements.
2. as I pointed - what I am saying is not from reaidng "usability study that you might read" but from "from my experience".
And from my experience, in last 4 years all 5 webapps I worked for actually moved from using "Next" button to using very big scrollable tables because users are requested that.
Now - it may be very specific to our apps and not be a common case - but this is a fact.

Any broad statement is wrong, including this one.

P.S. And I am absolutely agree with

2) Provide powerful filter and search tools so that users can quickly find just the relevant segments of data rather than having to wade through piles of it just to find what they really need.


[ November 29, 2004: Message edited by: Yuriy Fuksenko ]
 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Yuriy Fuksenko:

One more thing - from my experience, users hate "Next" button. They prefer to wait a little longer, but get everything (I dealt with about 500 Mb and up pages, and they wanted it all at once). You can use scrolling in your page to display data.



It seems that you may have a limited, specialized set of users here, so unfortunately, your experience may not be wholly accurate when developing on a large scale with a truly heterogeneous target audience. Usability studies are essential and should not be ignored. Every study I've read carries the similar theme of: users do not like to wait. If however, your target users are well-defined, will never change, and know exactly what they want, than of course, this must drive your development. But I doubt this is the case in many projects.
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Yuriy Fuksenko:
I understand that this is not a point of this discussion. But sinse it kind of starting rolling around of my response about "Next" button.
1. With no disrespect to Bear Bibeault - I hate broad statements.
2. as I pointed - what I am saying is not from reaidng "usability study that you might read" but from "from my experience".
And from my experience, in last 4 years all 5 webapps I worked for actually moved from using "Next" button to using very big scrollable tables because users are requested that.
Now - it may be very specific to our apps and not be a common case - but this is a fact.

Any broad statement is wrong, including this one.

P.S. And I am absolutely agree with


[ November 29, 2004: Message edited by: Yuriy Fuksenko ]



One solution for managing large data sets is to use an iframe as a dataBuffer.The browser response is fast since only 10 records or what ever get loaded as soon as they are available.While the user looks at these records the iframe is loading these 10 along with another 10,000 or whatever.Then manage the navagation using javascript to access the iframe dataBuffer.The iframe's style needs to have display:none set.The response time will be blazing fast even on a dialup.Also with a little more work you can use javascript to do filtering.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic