Connecting Tech Pros Worldwide Help | Site Map

Passing InnerHTML to Another Page

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 16th, 2006, 07:55 PM
Gus
Guest
 
Posts: n/a
Default Passing InnerHTML to Another Page

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, 09:35 AM
plato
Guest
 
Posts: n/a
Default 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, 07:15 PM
Gus
Guest
 
Posts: n/a
Default 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, 08:35 PM
RobG
Guest
 
Posts: n/a
Default 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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.