![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
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. |
|
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. |
#22
| |||
| |||
|
#23
| |||
| |||
|
|
MC a écrit : Just sending the data back will not work, as the client view may have html content from other sources in its view. how that could be possible ? Didn't you send the original html code ? 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. getting the image to data can be made on server, that is not the problem it is : - to realize a snapshot at the user - to send back this snapshot two operations impossible in JS 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. http://stephane.moriaux.pagesperso-o...nerHTML_danger As told you'll have to get all parts of the DOM while translating them in html without forgiving the content of forms's fields and other attributes of the tags and to put all that code in an hidden field sent with the form. But this method (if it works) will not allow you to assure the user did really saw what you or I will see with this code. The only possibly available method is to send back a PDF view of same html served with the form completed with what was sent back by the form, for agreement by user. And what about certificates ? What about forms in PDF ? (I don't know how to send back a filed pdf form) |
#24
| |||
| |||
|
|
SAM wrote on 17 jun 2008 in comp.lang.javascript: MC a écrit : Just sending the data back will not work, as the client view may have html content from other sources in its view. how that could be possible ? Didn't you send the original html code ? 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. getting the image to data can be made on server, that is not the problem it is : - to realize a snapshot at the user - to send back this snapshot two operations impossible in JS 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. http://stephane.moriaux.pagesperso-o...nerHTML_danger As told you'll have to get all parts of the DOM while translating them in html without forgiving the content of forms's fields and other attributes of the tags and to put all that code in an hidden field sent with the form. But this method (if it works) will not allow you to assure the user did really saw what you or I will see with this code. The only possibly available method is to send back a PDF view of same html served with the form completed with what was sent back by the form, for agreement by user. And what about certificates ? What about forms in PDF ? (I don't know how to send back a filed pdf form) SAM your advice is sound, however ... Perhaps the OP could ask the user to buy a digital camera and take a shot of the monitor screen, and then send that image over to the server? The subject is: "How do I get HTML sent to server?". |
#25
| |||
| |||
|
|
You might consider encapsulating the "legal" information into PDF and archiving that. *That would be a more reliable rendering of what "they saw", because PDF rendering is less variable between browsers. I think more to the point is that PDFs are not rendered by browsers, |
#26
| |||
| |||
|
#27
| |||
| |||
|
|
If your looking for the answer, I was able to duplicate the page the user views. I sent the innerHTML back to the server and it duplicated several test pages PERFECTLY with form data. |
#28
| ||||
| ||||
|
|
If your looking for the answer, I was able to duplicate the page the user views. I sent the innerHTML back to the server and it duplicated several test pages PERFECTLY with form data. This is great as we can snapshot what the user sees when they print. |
|
It may not be perfect but its good enough. Consistent, is the legal requirement, not perfection. function printForm() { sendArchivalCopy(document.documentElement.innerHTM L); |
|
window.print(); |
|
} MC PS using screenshots was never really considered. |
#29
| |||
| |||
|
#30
| |||
| |||
|
|
Sam, We support IE and Firefox only. Since this is a business environment and not consumer, we can dictate that. We also recommend IE7 as preferred since we have several USB tools that have plugins to IE. We do try to validate W3C as much as possible. |
|
MC PS for the code to work, you need to finish out the sendArchive function with ajax. |
![]() |
| Thread Tools | |
| Display Modes | |
| |