Re: How do I get HTML sent to server?
- From: "MC" <mica[removethis]@aisus.com>
- Date: Mon, 16 Jun 2008 12:00:02 -0500
"Lasse Reichstein Nielsen" <lrn@xxxxxxxxxx> wrote in message
news:prqhbdss.fsf@xxxxxxxxxxxxx
"MC" <mica[removethis]@aisus.com> writes:
Because a 3rd party server library requires it for processing just as it
looks completed on the client browser.
Sending the HTML won't give you that. It only gives you the structure
of the HTML, not what it *looks* like when displayed in a browser.
For that, you need a screenshot.
If you insist on converting the page's document structure back to HTML
and send that back to the server (including user-entered values in
form controls), you'll have to traverse the DOM structure and build
the HTML.
The non-standard innerHTML property only reads the original value
of input controls (i.e., "inputControl.originalValue", not the currently
entered value, "inputControl.value"). I.e., it misses the user entered
values.
This means that the HTML you generate is not what is currently being
shown, but *your* conversion of the DOM objects into a text
representation. If you are doing that anyway, why not just send
the values and build the structure on the server side.
Or, if you really, really need to be sure what the user sees,
accept his values as a normal form submit, and then generate
a bitmap image displaying those values along with a secret word,
and have the user submit the secret word to confirm that he
agrees with the data in the image.
That way you know what image was displayed, and that he can see
images.
/L
--
Lasse Reichstein Nielsen - lrn@xxxxxxxxxx
DHTML Death Colors:
<URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
THANK YOU!
I appreciate someone trying to help rather than criticize!
Just sending the data back will not work, as the client view may have html
content from other sources in its view.
I understand that a screenshot would work...any ideas on sending one back to
the server based on a .js event? I would really prefer to have a data image
as I can encrypt that and still retrieve the data from it. This will allow
me to pull data from it and index it to a database while storing the image.
The image does not need to be perfect as a client view but as good as
possible.
Is there any way to traverse and build the HTML and get the user entered
data? This is the real question no one seems to be able to answer.
MC
.
- Follow-Ups:
- Re: How do I get HTML sent to server?
- From: SAM
- Re: How do I get HTML sent to server?
- References:
- How do I get HTML sent to server?
- From: MC
- Re: How do I get HTML sent to server?
- From: SAM
- Re: How do I get HTML sent to server?
- From: MC
- Re: How do I get HTML sent to server?
- From: Lasse Reichstein Nielsen
- How do I get HTML sent to server?
- Prev by Date: Re: How do I get HTML sent to server?
- Next by Date: Re: How do I get HTML sent to server?
- Previous by thread: Re: How do I get HTML sent to server?
- Next by thread: Re: How do I get HTML sent to server?
- Index(es):
Relevant Pages
|