What's the use of hidden form?

G

GoCMS

Hi, guys:
I am trying debug other people(who has left company)'s ASP code, and had
difficulty understanding the use of a hidden asp page.

The application has an index page, like MyIndex.asp which has nothing but
a couple of other asp files, like
<frameset COLS="0,0,52%, *">
<frame NAME="hidden" SRC="MyHidden.asp">
<frame NAME="content" SRC="MyContent.asp">
</frameset>

MyHidden.asp is like this:
<!-- #include file="MyHidden.js" -->
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
' a LOT of server code retrieving data from database, and populate to
local variables.
Response.Write("<HTML><HEAD><TITLE></TITLE>")
Response.Write("<meta http-equiv='Content-Type' content='text/html'>")

Response.Write("</HEAD><BODY onBeforeUnLoad='unLoadForm()'>")
Response.Write("<FORM name='MyForm' ACTION='MyHidden.asp' METHOD=POST>")

Response.Write("<TEXTAREA NAME='txtStatus'>" & sStatus & "</TEXTAREA>")
Response.Write("<INPUT TYPE='text' NAME='txtCommand' VALUE=" & sCmd & ">")
Response.Write("<INPUT TYPE='text' NAME='txtSubmitToManager' VALUE=0>")
Response.Write("<INPUT TYPE='text' NAME='txtReadOnly' VALUE=" & bReadOnly
& ">")
Response.Write("<INPUT TYPE='text' NAME='txtCount' VALUE=" & iCnt & ">")
Response.Write("<INPUT TYPE='text' NAME='txtUserId' VALUE=" & nTimeTrackId
& ">")

Response.Write("</FORM>")
Response.Write("</BODY></HTML>")

My question is: with all these "response.write" in MyHidden.asp, I don't
actually see them anywhere on the web page, nor do I know what this hidden
form is for.

What if I want to check the values of some variables? When I added one
more Response.Write( "iCnt=" & iCnt ), the page gives me error.

So... can somebody help me interpret the code? Thanks!
 
P

Patrice

It looks like it posts to itself. Do you see in myhidden.asp some code that
handles the post. It would allow to see what it does server side with this
information. My guess would be some kind of navigation tracking system ???

What is the error you have if you add some code tho this page ? You could
also likely just change the frameset to reveal those hidden fields allowing
to see how it evolves as you goes through pages...

Good luck.

Patrice
 
G

GoCMS

Thanks for the reply. I still wonder why this form is not visible from the
web page, and how to check the values to be right.
 
P

Patrice

Unless I misundersttod it looks like it is in a 0 sized frame. If You change
this you should see the form...

Patrice

--
 
G

GoCMS

Yeah...I was so careless. Thanks! Both the server and client side are using
this hidden information. Client side uses it in javascript function to
manipulate other items in other form, and server side uses it to update
database. Now it makes more sense. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top