• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

document.documentElement.innerHTML question

 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,

I am taking the document.documentElement.innerHTML from the current page displayed to the user and converting it to pdf using Java.
I send document.documentElement.innerHTML from the client and interpret and process it at the server.
My question is :
there are several elements that I would like to remove in the html before I can send it over to the server.
Eg. I do not need some text boxes etc as the pdf will be a snapshot of the viewing page hence no need for input boxes.

When I try :
var comments = document.getElementById('toggleDisplayComments');
var parentElement = comments.parentNode;
parentElement.removeChild(comments);

The element gets removed in the page that is viewed and not in the html that I am sending.
Can someone please help how can I modify the document.documentElement.innerHTML before it gets sent using Javascript while not modifying the display.

Thanks.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a lot of topics referred to here, but JSP doesn't appear anywhere. So let's get this out of the JSP forum.
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic