What's the use of hidden form?

Discussion in 'ASP General' started by GoCMS, Jan 13, 2005.

  1. GoCMS

    GoCMS Guest

    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!
     
    GoCMS, Jan 13, 2005
    #1
    1. Advertising

  2. GoCMS

    Patrice Guest

    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

    --

    "GoCMS" <> a écrit dans le message de
    news:...
    > 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!
     
    Patrice, Jan 13, 2005
    #2
    1. Advertising

  3. GoCMS

    GoCMS Guest

    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.

    "Patrice" wrote:

    > 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
    >
    > --
    >
    > "GoCMS" <> a écrit dans le message de
    > news:...
    > > 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 & "
     
    GoCMS, Jan 13, 2005
    #3
  4. GoCMS

    Patrice Guest

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

    Patrice

    --

    "GoCMS" <> a écrit dans le message de
    news:...
    > 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.
    >
    > "Patrice" wrote:
    >
    > > 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
    > >
    > > --
    > >
    > > "GoCMS" <> a écrit dans le message de
    > > news:...
    > > > 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 & "
     
    Patrice, Jan 13, 2005
    #4
  5. GoCMS

    GoCMS Guest

    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. :)

    "Patrice" wrote:

    > Unless I misundersttod it looks like it is in a 0 sized frame. If You change
    > this you should see the form...
    >
    > Patrice
    >
    > --
    >
    > "GoCMS" <> a écrit dans le message de
    > news:...
    > > 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.
    > >
    > > "Patrice" wrote:
    > >
    > > > 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
    > > >
    > > > --
    > > >
    > > > "GoCMS" <> a écrit dans le message de
    > > > news:...
    > > > > 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 & "

    >
    >
    >
     
    GoCMS, Jan 13, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Me
    Replies:
    2
    Views:
    646
    Steven Cheng[MSFT]
    Feb 24, 2004
  2. Rick
    Replies:
    3
    Views:
    8,218
    Alexey Smirnov
    Apr 13, 2010
  3. GavMc
    Replies:
    4
    Views:
    350
    Evertjan.
    Sep 22, 2005
  4. Mark Hannon
    Replies:
    3
    Views:
    191
    Randy Webb
    Sep 3, 2004
  5. SolarCanine
    Replies:
    2
    Views:
    295
    SolarCanine
    Sep 20, 2005
Loading...

Share This Page