on each tab and included the button on each tab.If I click print on the first tab (Attendance Register) I get that tab printed. But if I click the print on the second tab - nothing prints.Any suggestions? Should I be able to nake a copy of the jQuery code for each tab with different print_div values? If I do what changes do i need to make to the jQuery etc??? Had no success with that at the moment.RegardsNick[attachment=0]4BJ01.jpg[/attachment][attachment=1]4BJ02.jpg[/attachment]"> print two tabs separately - Forums

Forums

print two tabs separately

NickOg 19 Dec, 2016
Hi all

I have a form with two tabs and want to print the content of each optionally and separately. See the two attached images.I am using Bob's JQ print code and have defined div id="print_div"> on each tab and included the button on each tab.If I click print on the first tab (Attendance Register) I get that tab printed. But if I click the print on the second tab - nothing prints.
Any suggestions? Should I be able to nake a copy of the jQuery code for each tab with different print_div values? If I do what changes do i need to make to the jQuery etc???
Had no success with that at the moment.

Regards

Nick
[attachment=0]4BJ01.jpg[/attachment]
[attachment=1]4BJ02.jpg[/attachment]
GreyHead 19 Dec, 2016
Hi Nick,

In HTML ids need to be unique so the first thing to try is to use <div id='print_tab1' /> and <div id='print_tab2' /> - you'll also need to edit the jQuery so that the submit buttons identify the correct divs to be printed.

Bob
NickOg 19 Dec, 2016
Thanks Bob - I thought I had done that but on waking suspect that I didn't follow that through correctly. I will give it a whirl.
Nick
NickOg 19 Dec, 2016
Yes - a little more care and that fixed it. A nice little JQuery exercise for 2017 - see if I can make a single routine work for several print buttons.

Next year - hope all is good for 2017

Regards

Nick
This topic is locked and no more replies can be posted.