Click here to Skip to main content
11,714,776 members (75,518 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript PHP
dear sir,

i have so many pages to print, and two diffrant footers.
like-

//footer 1

footer1 footer1
footer1 footer1


//footer 2

footer2 footer2
footer2 footer2

I try to print footer 1 on all pages but only last page i want to print footer 2.
printing pages are dinamically genereted.
anybdy plz help....
Posted 1-Aug-14 19:43pm
Comments
Sergey Alexandrovich Kryukov at 2-Aug-14 1:44am
   
Footers are pretty much the browser's feature. Well, good or bad, but this is so... Think about @page CSS rules...
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Why not give the <footer> an id, then use the DOM to replace the innerHTML for the object when you reach the last page.

for example, if your use

<script type="text/javascript">
 <footer id="xx">
  document.getElementById('xx').innerHTML = 'Hello From The New Footer!';
 </footer>
</script>


  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 570
1 Richard MacCutchan 275
2 Maciej Los 274
3 OriginalGriff 140
4 CHill60 135
0 Sergey Alexandrovich Kryukov 545
1 CHill60 375
2 Maciej Los 324
3 Richard MacCutchan 310
4 OriginalGriff 260


Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 5 Aug 2014
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100