Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 11th, 2003, 05:01 AM
Registered User
 
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default page numbering while outputting

Hi
I have a problem.
My English is not good if I make a mistake please forgive me.

I have a list of student list of each class in a school on a web page. some of class have more students which exceeds one page so
I have a table which has THEAD property row to give NAME and SURNAME and PAGE NUMBER for each page.

How can I do these things:

I want to show each class list page number from 1 to .... on the screen.
And if page is all printed I want to show all Page numbers in THEAD PAGE NUMBER part.

example: :)

I have to class. classA and classB.

classA have 60 student which is 1.5 page and classB have 100 student which is 2.5 page.
On the screen the heading part of table must show these..
              classA PAGE NUMBER: 1
              classB PAGE NUMBER: 2

but on printing since there are 5 page each page must show their own page number

like this:

classA PAGE NUMBER:1
classA PAGE NUMBER:2

classB PAGE NUMBER:3
classB PAGE NUMBER:4
classB PAGE NUMBER:5

sorry for this stupid english explanation and sampling :))))





AGB
 
Old November 11th, 2003, 06:06 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You don't say how you are creating the table but if 40 records constitute a page then use the css attribute page-break-after on every 40th record. If you were to show an example of the output you want I could help more. Do you want a new table for each page for instance or one long table with breaks?

Joe

--

Joe
 
Old November 12th, 2003, 07:57 AM
Registered User
 
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there are two repeater
first one is repeating the classes and the second one is the showing the students of the class.

there is a page break between two class list.

So the head of the table (which is created by the second repeater)is Student number, name ans surname and a one cell writing the PAGE NUMBER. (Table heading part)
 but there may be too many student in the list. On the output I can see the correct list but problem occuring in printing part.

Let's say 70 student. Assuming that there are 40 student on a page. So 2 page is needed for this class list. While printing this pages the PAGE NUMBER part of table head part must output the correct numbers.

One page on the screen(PAGE NUMBER : 1 ) and two page while printing(PAGE NUMBER : 1, PAGE NUMBER : 2 (other page)).

Please help me...


AGB
 
Old November 12th, 2003, 11:10 PM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default

xiiii

I don't know if that can be done..
I think you want diferent behaviours of the table at the same time.

When printing you want one behaviour
when on screen you want another behaviour..

hope somebody can help you..
I cant! :(

 
Old November 13th, 2003, 06:31 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

It can be done using css, particularly the @media designator which can be set to screen or print. You define two classes for the different behaviours. When you say repeaters do you mean you're using asp.net?

--

Joe
 
Old November 13th, 2003, 12:03 PM
Registered User
 
Join Date: Aug 2003
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes I am using ASP.NET with visual Basic
But I think this page numbering must be implemeneted with JavaScript



AGB





Similar Threads
Thread Thread Starter Forum Replies Last Post
Page numbering: count odd pages only zolex82 XSLT 0 December 5th, 2005 11:43 AM
Page numbering athanatos XSLT 4 May 13th, 2005 06:12 PM
Report Page numbering leehambly Access 1 March 17th, 2005 05:33 AM
Page numbering in crystal report 9.0 rajeshnerenki Crystal Reports 2 December 10th, 2004 11:29 AM
Crystal Report 9.0 Page numbering rajeshnerenki Crystal Reports 0 June 23rd, 2004 01:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.