简体   繁体   中英

ASP classic: Get the written page as a string

My problem is the next one:

I have an ASP page which submits to itself. When the button confirm is clicked, the javascript function confirm is called and at the end of it the submit is done. In that function, before I do the submit, I can get the written page doing "document.childNodes[0].outerHTML".

What I want is to get the string that I got doing "document.childNodes[0].outerHTML" inside confirm javascript function, but after the submit in the VBScript part.

Does anybody knows something about this issue? Could anyone please help me?

Than you very much and best regads.

Just pass it as value of hidden form field.

HTML:

<input type="hidden" name="outerHTML" />

Then in the JavaScript code just before submitting:

document.forms["form_name"].elements["outerHTML"].value = document.childNodes[0].outerHTML;

And you can read it in the server side code:

<%
Dim rawHTML
If (form was submitted) Then
    rawHTML = Request("outerHTML")
    '...
End If
%>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM