We are offering a coupon for a free soft drink to everyone who fills out our survey. When the user hits the Submit button at the end of the survey, a page appears with the coupon and a Print button. Currently, the whole page prints, including headings and links. I would like to print only the coupon. This is made trickier by the fact that the coupon is customized for each person with the person's name and the date. All help will be greatly appreciated.
amjones 0 Newbie Poster
Recommended Answers
Jump to PostDon't provide the print option on the coupon page. Instead create a 'print view' button at the bottom which will take the user to a page without any frills with just the coupon. I don't know what kind of technique or server side language you are using to persist the …
Jump to PostNo problem at all, just have the browser open a new page (upon clicking print)
window.open("your page here")
pass the parameters that you need..
i,e. the coupon is customized for each person with the person's name and the datewindow.open("yourPage.htm?customername=xxx&date=yyy")
After the page renders with the coupon,
…
Jump to PostBetter solution: use CSS. With CSS you can create a stylesheet dedicated to printing which is separate from the regular page display. This way you can use CSS to remove the parts of the page you don't want printed and even reformat the parts you do want printed. All major …
All 9 Replies
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
MidiMagic 579 Nearly a Senior Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
MidiMagic 579 Nearly a Senior Poster
MidiMagic 579 Nearly a Senior Poster
plasmafire 0 Newbie Poster
stymiee 111 He's No Good To Me Dead Team Colleague
raphie 3 Light Poster
fxm 23 Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.