473,378 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to provide option to print attribute

7
First I'm a newbie to XML.

My admin is passing product info to me as XML. I was able to format my xml using a XSLT and make it look nice online. Now, I'm trying to print catalog pages from the formated xml to a pdf using a processor. OK. I can buy solutions there.

But I have been asked to provide some control over what gets printed. So here is the example.

Expand|Select|Wrap|Line Numbers
  1. <product name="Widget1" type="round" size="Medium" price="4.00">
I've managed to create XHTML pages that look good on screen. They look nicer than this but imagine some nice formating around this...

Widget
------------------
Type: round
Size: Medium
Price: $4.00


So now instead of printing a page that has the product info nicely formated...I have to give the user the option of printing or not printing an products attributes using something like a check box, radio button, or other control. Well I don't know how to do that.

Hopefully that makes some sense. Does anyone have any suggestions for me?

Any help is appreciated.
May 19 '07 #1
2 1194
dorinbogdan
839 Expert 512MB
Welcome to TheScripts TSDN...

At this point I think that you should use Javascript.
You could build a separate html page to be the printable version, having the "display" attribute of each printable element = "block".
to show an element use:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("yourElementId").style.display = "block";
to hide it, use:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("yourElementId").style.display = "none";
May 21 '07 #2
swsdam
7
Thank you Dorin. I will try that.
May 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Peter Otten | last post by:
There is currently a discussion on python-dev about an extract() function which offers fast access to list items and object attributes. It could serve, e. g., as the key argument of the future...
12
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
3
by: JimO | last post by:
I do some web page maintenance for the K-12 district I work for. I'm writing some pages so users can print schedules and such. Is there a way to keep the browser from printing the page title,...
6
by: Dennis Allen | last post by:
Hi. On one particular web page I want to offer the user a print button. Question. How do I create one? Something compatible with most browsers would be nice. Appreciate any advice...Dennis
1
by: Wim van Rosmalen | last post by:
Hi folks, I've upgraded MS-Access 2002 to a MS-Access Project (adp), so now I have to deal with more sophisticated queries (may I call them so?) like stored procedures. I have a form with a...
1
by: Michael Beck | last post by:
I need to select one of about 15 printers, which I have been able to do. Then I need to set that printer as the printer to use, run a Crystal Reports reports, and track if/when the printing job...
1
by: Steff | last post by:
I am wandering if my code is making sense... I use a lot the print function. Is it weird in this case where I have to display an array ? I thought it would be better to have the entire array in php...
5
by: prakashturkar | last post by:
Hi, I am Prakash.... I have tried to print an MS Word file using the basic print utilities provided in JAVA.But while asking for printing through my own code i am getting proble for example..."The...
11
by: JWest46088 | last post by:
I'm having difficulty trying to figure out how to print a text file from a hash table one line at a time. I have the text file read into the hash table and can print the text file all at once, but I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.