If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Print only selected items on a page

I've been asked to provide some tricky printing functionality to a dynamicly generated page. The page is to display each record along with a checkbox. Then one print button at the bottom of the page. The idea is to let the user check the box next to each record they want to print, then when they click the print button at the bottom of the page, only those records that were selected will be printed.

I'm assuming some combination of CSS and Javascript will be required, but I really don't know. Any ideas? Thanks in advance!

Doing this with JS maybe be a bit hard. I suppose you can add some DIV tags or give your TR's id setting and make use of InnerHtml. Pop a new window open and write its content using JS, transfer the InnerHtml values over to the new page that way.

It may be easier to do it server side (CF). Have your current page sumbit (to a new window), the server reads which checkboxes are on and maybe runs another query to pull the correct data. Give this new page a body onload event with JS to print and then close the window.

You may want to change your id and name to include recSet.CurrentRow just to make it easier to tell what's what.

That would be at about 5000 feet, as I haven't done CF in a while I dont have examples for you.