Computing desk | ||
---|---|---|
< June 2 | << May | June | Jul >> | June 4 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Hello,
I am working customer service at a business. We have a customer who sends their purchase orders as embedded HTML, and can not change this in their system for a while. I am receiving this into a GMail account, and just want to print the contents of the message. So the general layout looks like this vertically:
Senders info, time sent, who sent to, the little arrow on the top that lets you do things to the message, print icon Body of message (This is the section i want) Horizontal Rule Quick reply box
By pressing F12 in firefox, i was able to find via the inspector that there is a div tag happily containing everything i want to print! This div tag looks like this:
<div style="FONT-SIZE:8pt;FONT-FAMILY:Arial">
I wanted to maybe somehow write a java program to take the raw HTML and delete all except this div tag and its child nodes, but when i right click in gmail and do view source, the HTML is TOTALLY DIFFERENT! I search for the above tag and it is not there! Isnt inspector from FireFox just a more complicated view of the raw HTML, in that it organizes the nodes beyond raw text, and allows edits etc?
I also realize that this might not work well, depending on if the styling of the message itself is inline or elsewise. What is the best way to print ONLY THE MESSAGE? I do not want to use GMail's standard print feature, as print/print-all adds a header with GMail logo, and also preserves the To: and From: fields, which i dont want to be shown for important reasons.
Thanks in advance for any tips/help! :)
216.173.144.188 ( talk) 15:39, 3 June 2015 (UTC)
<body>
element, right click on it and choose "Paste Inner HTML".<div id="message-body">
document.getElementsByTagName("body")[0].innerHTML = document.getElementById("message-body").innerHTML;
getElementsByTagName
gives you an array of elements.[0]
gives you the first thing in that array.getElementById
returns just one element.No, i did not confuse Java with JavaScript, and i know they are different. My intent was to do parsing of the raw HTML using a Java Application. However, since JS alters the raw HTML in this case, it seems like a less viable solution. I was looking for something quick that didnt involve manually deleting nodes from inspector, but that method may have to do in this case. 216.173.144.188 ( talk) 13:55, 4 June 2015 (UTC)
How do you can a graph that let's a user go through options? It is quite common in troubleshooting. For example, you have a lozenge with a question that you answers as yes/no, and then you follow one route or the other. -- Llaanngg ( talk) 17:29, 3 June 2015 (UTC)
Hello friends,
I got something for you lot:
192.168.70.20server-2/Games-Collection/Hands-PC
If you know what to do, then you know what to do!
Mr. Prophet ( talk) 19:32, 3 June 2015 (UTC)
When dinosaurs still roamed the Earth, I studied FORTRAN, COBOL, BASIC and a couple of other languages and, while the cable channel at the beach with beautiful music and community announcements looked like something which could be produced with simple computer programs in that era, it also had a crawl at the bottom of the screen, sort of like with TV weather bulletins. That's one thing we never did.— Vchimpanzee • talk • contributions • 20:41, 3 June 2015 (UTC)
call system("CLS")
system("CLS");
Computing desk | ||
---|---|---|
< June 2 | << May | June | Jul >> | June 4 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Hello,
I am working customer service at a business. We have a customer who sends their purchase orders as embedded HTML, and can not change this in their system for a while. I am receiving this into a GMail account, and just want to print the contents of the message. So the general layout looks like this vertically:
Senders info, time sent, who sent to, the little arrow on the top that lets you do things to the message, print icon Body of message (This is the section i want) Horizontal Rule Quick reply box
By pressing F12 in firefox, i was able to find via the inspector that there is a div tag happily containing everything i want to print! This div tag looks like this:
<div style="FONT-SIZE:8pt;FONT-FAMILY:Arial">
I wanted to maybe somehow write a java program to take the raw HTML and delete all except this div tag and its child nodes, but when i right click in gmail and do view source, the HTML is TOTALLY DIFFERENT! I search for the above tag and it is not there! Isnt inspector from FireFox just a more complicated view of the raw HTML, in that it organizes the nodes beyond raw text, and allows edits etc?
I also realize that this might not work well, depending on if the styling of the message itself is inline or elsewise. What is the best way to print ONLY THE MESSAGE? I do not want to use GMail's standard print feature, as print/print-all adds a header with GMail logo, and also preserves the To: and From: fields, which i dont want to be shown for important reasons.
Thanks in advance for any tips/help! :)
216.173.144.188 ( talk) 15:39, 3 June 2015 (UTC)
<body>
element, right click on it and choose "Paste Inner HTML".<div id="message-body">
document.getElementsByTagName("body")[0].innerHTML = document.getElementById("message-body").innerHTML;
getElementsByTagName
gives you an array of elements.[0]
gives you the first thing in that array.getElementById
returns just one element.No, i did not confuse Java with JavaScript, and i know they are different. My intent was to do parsing of the raw HTML using a Java Application. However, since JS alters the raw HTML in this case, it seems like a less viable solution. I was looking for something quick that didnt involve manually deleting nodes from inspector, but that method may have to do in this case. 216.173.144.188 ( talk) 13:55, 4 June 2015 (UTC)
How do you can a graph that let's a user go through options? It is quite common in troubleshooting. For example, you have a lozenge with a question that you answers as yes/no, and then you follow one route or the other. -- Llaanngg ( talk) 17:29, 3 June 2015 (UTC)
Hello friends,
I got something for you lot:
192.168.70.20server-2/Games-Collection/Hands-PC
If you know what to do, then you know what to do!
Mr. Prophet ( talk) 19:32, 3 June 2015 (UTC)
When dinosaurs still roamed the Earth, I studied FORTRAN, COBOL, BASIC and a couple of other languages and, while the cable channel at the beach with beautiful music and community announcements looked like something which could be produced with simple computer programs in that era, it also had a crawl at the bottom of the screen, sort of like with TV weather bulletins. That's one thing we never did.— Vchimpanzee • talk • contributions • 20:41, 3 June 2015 (UTC)
call system("CLS")
system("CLS");