473,387 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

What's the use of hidden form?

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!
Jul 22 '05 #1
6 1884
people use them to "store" things, like variable values, etc, for later use.
You write things to them. Since they are in a frameset they dont get
lost/wiped unless the parent does. It's a way around using sessions or
passing values to every form all the time.
--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"GoCMS" <Go***@discussions.microsoft.com> wrote in message
news:0D**********************************@microsof t.com...
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!

Jul 22 '05 #2
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" <Go***@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
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!

Jul 22 '05 #3
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" <Go***@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
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 & "

Jul 22 '05 #4
Unless I misundersttod it looks like it is in a 0 sized frame. If You change
this you should see the form...

Patrice

--

"GoCMS" <Go***@discussions.microsoft.com> a écrit dans le message de
news:63**********************************@microsof t.com...
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" <Go***@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
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 & "

Jul 22 '05 #5
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" <Go***@discussions.microsoft.com> a écrit dans le message de
news:63**********************************@microsof t.com...
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" <Go***@discussions.microsoft.com> a écrit dans le message de
news:0D**********************************@microsof t.com...
> 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 & "


Jul 22 '05 #6
> <frameset COLS="0,0,52%, *">
<frame NAME="hidden" SRC="MyHidden.asp">
<frame NAME="content" SRC="MyContent.asp">
</frameset>


This frameset declares 4 "columns" - the first and second being 0 wide, the
third column uses 52% of the window width and the forth column takes up the
remainer - in this case 48%

You can view the "myhidden.asp" page by modifying the first column to be
something other than zero. From the above example, it looks like
"MyContent.asp" page is also zero width.

Anyway, the values stored on this hidden page are available to any client-side
code which can be addressed in any other page using code like this:

window.parent.frames(0).myForm.txtUserId.value

The hidden window is designed to hold common values on the client that any
other HTML page might want to use or reference.

Brian

Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
1
by: Sam Wuebben | last post by:
I would like to add a few hidden field values to a form as it is submited via JavaScript. I have a static page shopping site that uses MIVA shopping cart. Some of the pages are getting quite...
2
by: francisco lopez | last post by:
Yesterday I had a problem with a javascript to validate my form, but you helped my out yesterday and it works now perfectly!!! so thank you!!! the problem I have now is the following: I put...
5
by: Werner Partner | last post by:
On my testpage http://www.sonoptikon.de/test.php I have this <table><tr> <td valign="top" align="center" style="width:150px;"> <form action=test.php method="get">
1
by: Madame Blablavatsky | last post by:
hello, i am trying to build a kind of very, very simple ritch text editor for people to use with a very simple cms. at the moment i am working on the basic structure. the text is put in an...
12
by: Alan Silver | last post by:
Hello, I have a page that gets passed an ID in the query string. It then uses this ID to pull info out of a database and populate controls on the page. When the page is posted back, the query...
4
by: _Raven | last post by:
Okay, I am playing with submitting forms with Ajax. I am trying to adapt this script to my forms: http://www.captain.at/howto-ajax-form-post-get.php I have included my code at the bottom of this...
2
by: Tarik Monem | last post by:
OK! I've gone through a few tutorials and I cannot understand what I'm doing wrong casting_registration.php <table> <tr> <td> <form enctype="multipart/form-data" action="thankyou.php"...
0
by: stefcollect | last post by:
Hi all, I am pretty new to PHP and am stuck on - what I think - is a generic string handling problem. I need to read and manipulate some HTML files and have a problem in getting some...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.