Connecting Tech Pros Worldwide Help | Site Map

Passing InnerHTML to Another Page

  #1  
Old August 16th, 2006, 08:55 PM
Gus
Guest
 
Posts: n/a
Hey Everyone,

I have a situation in where i have dynamically generated reports that
need to open up in a spreadsheet. Problem is i cant modify the server
side pages all i have are the rendered html....is it possible to grab
the innerHTML table and send it to a server-side page?

Thanks in advance. Gus

  #2  
Old August 17th, 2006, 10:35 AM
plato
Guest
 
Posts: n/a

re: Passing InnerHTML to Another Page


It's kinda dirty but you could engineer something like this to happen
onsubmit, where <input type="hidden" id="someInputBox"is somewhere in
the form:

var htmlToGrab = document.getElementById( containerElement );
var hiddenInputBox = document.getElementById( someHiddenInputBox );

hiddenInputBox.value = htmlToGrab.innerHTML;

Then, the innerHTML would be available as if it were an original form
element. Is this what you were looking for?

-plato

  #3  
Old August 17th, 2006, 08:15 PM
Gus
Guest
 
Posts: n/a

re: Passing InnerHTML to Another Page


Just what i wanted, thanks a mil, plato.



plato wrote:
Quote:
It's kinda dirty but you could engineer something like this to happen
onsubmit, where <input type="hidden" id="someInputBox"is somewhere in
the form:
>
var htmlToGrab = document.getElementById( containerElement );
var hiddenInputBox = document.getElementById( someHiddenInputBox );
>
hiddenInputBox.value = htmlToGrab.innerHTML;
>
Then, the innerHTML would be available as if it were an original form
element. Is this what you were looking for?
>
-plato
  #4  
Old August 17th, 2006, 09:35 PM
RobG
Guest
 
Posts: n/a

re: Passing InnerHTML to Another Page



plato wrote:
Quote:
It's kinda dirty but you could engineer something like this to happen
onsubmit, where <input type="hidden" id="someInputBox"is somewhere in
the form:
>
var htmlToGrab = document.getElementById( containerElement );
var hiddenInputBox = document.getElementById( someHiddenInputBox );
>
hiddenInputBox.value = htmlToGrab.innerHTML;
>
Then, the innerHTML would be available as if it were an original form
element.
No, it wont. Different browsers will give different results depending
on whether the user has modified the value of text input elements.


--
Rob

Closed Thread