473,326 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

how to send the current page's content as part of a form

Greetings,

I would like to do the following:

- I have a page with a form inside. When the user submits the form, I
would like to have a hidden variable in that form that contains the
entire page content as it was when the 'submit' button was clicked
(including the HTML, not only the form values). (The reason I want to
do this is that I want to save every 'form submission' to a database on
the server side.)

I read about the innerHTML, but it looks like its not portable across
browsers.

I suspect the solution would be using somekind of javascript, by
iterating through the DOM elements of the document and so on, but I'm
not sure...

Any ideas on how to implement this?
Thanks!
Andre
Aug 4 '06 #1
1 1319
Andre Charbonneau wrote:
I suspect the solution would be using somekind of javascript, by
iterating through the DOM elements of the document and so on, but I'm
not sure...

Any ideas on how to implement this?
Yes, dom would work. Check out a simple starter script I came up with
(firefox tested only)
http://em.hopto.org/code/test/javasc...t_out_src.html

Very, very basic but could possibly get the job done. Note that I put
'all possible' tags in an object, rather than using a regex search to
look for closing tags.

I have yet to test on a large page, as I guess this method would likely
take a lot of time. Think about what you'll do for css, input values,
javascript, etc...

Let me know if you get anywhere with this!

Aug 4 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kassam | last post by:
Hi MVPs out there. I have constructed an order form and the users will enter the informtion. I now need to send the filled out form as an e-mail (body being the HTML with the fille din data) to...
4
by: Mark J. McGinty | last post by:
Greets, Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.) It worked just fine in...
3
by: Damian | last post by:
Hi everyone I'm having an issue with one of our applications. I'm getting the following error when attempting to log in to the site: Server Error in 'xxxxxxxxxxxxxxxx' Application....
0
by: nauticalmac | last post by:
I'm using CDO to send mail to the site owner from ASP pages with forms. Recently one of my forms is occasionally sending email with what seems to be an insertion which is replacing the plain text...
6
by: paul | last post by:
HI! How do we send a variable from an Iframe page back to its parent? I have a script that calculates the iframe's window size but I need to know how to send that value back to its parent so I...
4
by: Thomas Eichner | last post by:
Hi, does anybody know a public website which offers a service that displays all data send by a browser (or an app calling the website), especially HTTP GET and POST data, browser data etc.? I...
3
ak1dnar
by: ak1dnar | last post by:
When I am sending a form Input like in this format using ajax to my ASP.Net page; term=ASP & PHP Using This JavaScript; function myFunc(term_from_form){ var qstring = "term="+term_from_form;...
5
by: damezumari | last post by:
How do I let the user send the current html page they are on as the message in an email? I know how to send emails with php, but not how I let the current page be the message. I want to do...
1
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.