By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,849 Members | 2,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,849 IT Pros & Developers. It's quick & easy.

Passing InnerHTML to Another Page

P: n/a
Gus
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

Aug 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

Aug 17 '06 #2

P: n/a
Gus
Just what i wanted, thanks a mil, plato.

plato wrote:
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
Aug 17 '06 #3

P: n/a

plato wrote:
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

Aug 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.