473,216 Members | 1,278 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,216 software developers and data experts.

Form not passing data ???

Below is some ASP, HTML and javascript. It is part of a page used to
maintain a small database. This code did work at one time, but has since
stopped. For some reason the data on my form is not being passed to the page
specified in the Action property of the form. This is on a Windows 2000 Pro
PC.

I copied the code to another server (Windows XP Pro machine) and it DOES
work as expected there.

The first block is the data located near the middle of the body of my main
page. Each "row" has an OnClick event that calls the function in the second
block.

The second block of code calls a javascript function in the page located on
an IFrame on this page and then makes the IFrame visible.

The third block is located in the IFrame page. It should list all the values
passed from a form POSTed to this page. This comes up empty... All I see is
Start -><- End.

The fourth block is located in another ASP file situated in an IFrame on the
main page. This IFrame is not visible until the javascript in the third
block is executed by clicking a row located in the second block of code. It
contains a hidden form used to pass data back to ASP code on this page.

The final block is also located on the IFrame page. It loads values onto a
hidden form within this page and then submits the form. This is where I'm
having a problem... When this code is called, the Alert function shows the
proper value for "key", and the SUBMIT occurs as expected, but the
subEdit.asp page does not recieve any form value.

Any idea why the Windows 2000 server is not working as expected? I've
already tried restarting IIS and the properties on the virtual directory is
identical on the two PC's.

Thx!!!
<span id="72" class="row" onmouseover="SelectAgent('72','Anne Agent')"
onclick="editAgent('72');" >
<span class="item" style="width: 10em;"><span class="data">Anne
Agent</span></span>
</span>
<span id="69" class="row" onmouseover="SelectAgent('69','Al Over')"
onclick="editAgent('69');">
<span class="item" style="width: 10em;"><span class="data">Al
Over</span></span>
</span>

// Edit an agent ------------------------------------------------
function editAgent(key) {
//Retrieve agent info and make IFRAME visible
frames("EditFrame").getAgent(key);
EditContainer.style.display="block";
}

<%'Located near the beginning of the subEdit.asp page.
response.Write "START ->"
for each name in Request.Form
response.Write name & "<br />" & vbcrlf
next
response.Write "<- END"
%>

<script type="text/javascript" language="javascript">
// Load agent key & activity onto form and
submit ------------------------------------------------
function getAgent(key) {
alert(key);
document.forms("actionForm").reset();
document.forms("actionForm").Key.value = key;
document.forms("actionForm").ToDo.value="Get";
document.forms("actionForm").submit();
}
</script>

<form name="actionForm" id="actionForm" method="POST" action="subEdit.asp"
style="display: none;">
<input type="text" name="Key" id="Key" value="">
<input type="text" name="Name" id="Name" value="">
<input type="text" name="ToDo" id="ToDo" value="">
</form>

Jul 22 '05 #1
10 2856
"Noozer" wrote in message news:cl1Ee.10988$s54.6574@pd7tw2no...
: Below is some ASP, HTML and javascript. It is part of a page used to
: maintain a small database. This code did work at one time, but has since
: stopped. For some reason the data on my form is not being passed to the
page
: specified in the Action property of the form. This is on a Windows 2000
Pro
: PC.
:
: I copied the code to another server (Windows XP Pro machine) and it DOES
: work as expected there.
:
: The first block is the data located near the middle of the body of my main
: page. Each "row" has an OnClick event that calls the function in the
second
: block.
:
: The second block of code calls a javascript function in the page located
on
: an IFrame on this page and then makes the IFrame visible.
:
: The third block is located in the IFrame page. It should list all the
values
: passed from a form POSTed to this page. This comes up empty... All I see
is
: Start -><- End.
:
: The fourth block is located in another ASP file situated in an IFrame on
the
: main page. This IFrame is not visible until the javascript in the third
: block is executed by clicking a row located in the second block of code.
It
: contains a hidden form used to pass data back to ASP code on this page.
:
: The final block is also located on the IFrame page. It loads values onto a
: hidden form within this page and then submits the form. This is where I'm
: having a problem... When this code is called, the Alert function shows the
: proper value for "key", and the SUBMIT occurs as expected, but the
: subEdit.asp page does not recieve any form value.
:
: Any idea why the Windows 2000 server is not working as expected? I've
: already tried restarting IIS and the properties on the virtual directory
is
: identical on the two PC's.
:
: Thx!!!
:
:
: <span id="72" class="row" onmouseover="SelectAgent('72','Anne Agent')"
: onclick="editAgent('72');" >
: <span class="item" style="width: 10em;"><span class="data">Anne
: Agent</span></span>
: </span>
: <span id="69" class="row" onmouseover="SelectAgent('69','Al Over')"
: onclick="editAgent('69');">
: <span class="item" style="width: 10em;"><span class="data">Al
: Over</span></span>
: </span>
:
:
:
: // Edit an agent ------------------------------------------------
: function editAgent(key) {
: //Retrieve agent info and make IFRAME visible
: frames("EditFrame").getAgent(key);
: EditContainer.style.display="block";
: }
:
:
:
: <%'Located near the beginning of the subEdit.asp page.
: response.Write "START ->"
: for each name in Request.Form
: response.Write name & "<br />" & vbcrlf
: next
: response.Write "<- END"
: %>
:
:
:
: <script type="text/javascript" language="javascript">
: // Load agent key & activity onto form and
: submit ------------------------------------------------
: function getAgent(key) {
: alert(key);
: document.forms("actionForm").reset();
: document.forms("actionForm").Key.value = key;
: document.forms("actionForm").ToDo.value="Get";
: document.forms("actionForm").submit();
: }
: </script>
:
:
:
: <form name="actionForm" id="actionForm" method="POST" action="subEdit.asp"
: style="display: none;">
: <input type="text" name="Key" id="Key" value="">
: <input type="text" name="Name" id="Name" value="">
: <input type="text" name="ToDo" id="ToDo" value="">
: </form>

Are you running antivirus with script blocking on the W2K system?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #2

"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Noozer" wrote in message news:cl1Ee.10988$s54.6574@pd7tw2no...
: Below is some ASP, HTML and javascript. It is part of a page used to
: maintain a small database. This code did work at one time, but has since
: stopped. For some reason the data on my form is not being passed to the
page
: specified in the Action property of the form. This is on a Windows 2000
Pro
: PC.
<snip>
Are you running antivirus with script blocking on the W2K system?


Nope...Other pages on the server are working. There is even a form on the
main form here that works as expected. Wouldn't script blocking stop the
whole script? The ALERT command in the getAgent function does fire and this
is where the script fills and submits the form.

I ruled out a typo when I tried the same code on a new PC and it worked.

The code DID work on the Windows 2000 server two weeks ago. Not sure when it
stopped working properly.
Jul 22 '05 #3

"Noozer" <do*******@me.here> wrote in message
news:cl1Ee.10988$s54.6574@pd7tw2no...
Below is some ASP, HTML and javascript. It is part of a page used to
maintain a small database. This code did work at one time, but has since
stopped. For some reason the data on my form is not being passed to the page specified in the Action property of the form. This is on a Windows 2000 Pro PC.

I copied the code to another server (Windows XP Pro machine) and it DOES
work as expected there.


I made the form visible and added a SUBMIT button and removed the submit
method call in the javascript. Now I need to press the SUBMIT button to
complete the process.

The form is loaded up as I expected, but I click SUBMIT and the REQUEST.FORM
object is STILL empty. This is the ONLY form on the site that is doing this,
and only on this server.

I tried copying files to a new folder and adding a new virtual directory,
but no change.

<*sigh*>
Jul 22 '05 #4
What authentication is enabled for the entire website, the page generating
this HTML, and the target POST page?

It is possible for form data to be "missing" if the original page is
authenticated but the target POST page is not authenticated due to an IE
POST optimization (if IE is POST'ing to a website it thinks is
authenticated, it will NOT send the Form data on the first POST because it
thinks it will get rejected by 401 -- however, you fool IE by making the
target POST page not require authentication -- thus, it results in a 200 but
no form data sent). The optimization is reasonable in the case of
high-latency authenticated requests -- suppose the post is for 100MB --
should IE send 100MB on the first post, have it rejected by 401, then send
100MB again with the right credentials the second time?

If this is your problem, then the solution is to make your website uniform
authenticated.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Noozer" <do*******@me.here> wrote in message
news:cl1Ee.10988$s54.6574@pd7tw2no...
Below is some ASP, HTML and javascript. It is part of a page used to
maintain a small database. This code did work at one time, but has since
stopped. For some reason the data on my form is not being passed to the page
specified in the Action property of the form. This is on a Windows 2000 Pro
PC.

I copied the code to another server (Windows XP Pro machine) and it DOES
work as expected there.

The first block is the data located near the middle of the body of my main
page. Each "row" has an OnClick event that calls the function in the second
block.

The second block of code calls a javascript function in the page located on
an IFrame on this page and then makes the IFrame visible.

The third block is located in the IFrame page. It should list all the values
passed from a form POSTed to this page. This comes up empty... All I see is
Start -><- End.

The fourth block is located in another ASP file situated in an IFrame on the
main page. This IFrame is not visible until the javascript in the third
block is executed by clicking a row located in the second block of code. It
contains a hidden form used to pass data back to ASP code on this page.

The final block is also located on the IFrame page. It loads values onto a
hidden form within this page and then submits the form. This is where I'm
having a problem... When this code is called, the Alert function shows the
proper value for "key", and the SUBMIT occurs as expected, but the
subEdit.asp page does not recieve any form value.

Any idea why the Windows 2000 server is not working as expected? I've
already tried restarting IIS and the properties on the virtual directory is
identical on the two PC's.

Thx!!!
<span id="72" class="row" onmouseover="SelectAgent('72','Anne Agent')"
onclick="editAgent('72');" >
<span class="item" style="width: 10em;"><span class="data">Anne
Agent</span></span>
</span>
<span id="69" class="row" onmouseover="SelectAgent('69','Al Over')"
onclick="editAgent('69');">
<span class="item" style="width: 10em;"><span class="data">Al
Over</span></span>
</span>

// Edit an agent ------------------------------------------------
function editAgent(key) {
//Retrieve agent info and make IFRAME visible
frames("EditFrame").getAgent(key);
EditContainer.style.display="block";
}

<%'Located near the beginning of the subEdit.asp page.
response.Write "START ->"
for each name in Request.Form
response.Write name & "<br />" & vbcrlf
next
response.Write "<- END"
%>

<script type="text/javascript" language="javascript">
// Load agent key & activity onto form and
submit ------------------------------------------------
function getAgent(key) {
alert(key);
document.forms("actionForm").reset();
document.forms("actionForm").Key.value = key;
document.forms("actionForm").ToDo.value="Get";
document.forms("actionForm").submit();
}
</script>

<form name="actionForm" id="actionForm" method="POST" action="subEdit.asp"
style="display: none;">
<input type="text" name="Key" id="Key" value="">
<input type="text" name="Name" id="Name" value="">
<input type="text" name="ToDo" id="ToDo" value="">
</form>


Jul 22 '05 #5
"Noozer" wrote in message news:_M1Ee.11155$s54.1475@pd7tw2no...
:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:%2****************@tk2msftngp13.phx.gbl...
: > "Noozer" wrote in message news:cl1Ee.10988$s54.6574@pd7tw2no...
: > : Below is some ASP, HTML and javascript. It is part of a page used to
: > : maintain a small database. This code did work at one time, but has
since
: > : stopped. For some reason the data on my form is not being passed to
the
: > page
: > : specified in the Action property of the form. This is on a Windows
2000
: > Pro
: > : PC.
:
: <snip>
:
: > Are you running antivirus with script blocking on the W2K system?
:
: Nope...Other pages on the server are working. There is even a form on the
: main form here that works as expected. Wouldn't script blocking stop the
: whole script? The ALERT command in the getAgent function does fire and
this
: is where the script fills and submits the form.
:
: I ruled out a typo when I tried the same code on a new PC and it worked.
:
: The code DID work on the Windows 2000 server two weeks ago. Not sure when
it
: stopped working properly.

I don't see anything that jumps out at me but you could try some things:

1. Put this at the top of your inline code...

dim r
r = Request.ServerVariables("REQUEST_METHOD")
Response.Write r

This should return POST. If it is blank or returns GET, Request.Form will
return nothing.
2. I have never hidden a form with CSS. I do this:

<form action="" method="post">
<input type="hidden: name="var1" value="<%=var1%>" />
</form>

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #6
"David Wang [Msft]" wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
: What authentication is enabled for the entire website, the page generating
: this HTML, and the target POST page?
:
: It is possible for form data to be "missing" if the original page is
: authenticated but the target POST page is not authenticated due to an IE
: POST optimization (if IE is POST'ing to a website it thinks is
: authenticated, it will NOT send the Form data on the first POST because it
: thinks it will get rejected by 401 -- however, you fool IE by making the
: target POST page not require authentication -- thus, it results in a 200
but
: no form data sent). The optimization is reasonable in the case of
: high-latency authenticated requests -- suppose the post is for 100MB --
: should IE send 100MB on the first post, have it rejected by 401, then send
: 100MB again with the right credentials the second time?
:
: If this is your problem, then the solution is to make your website uniform
: authenticated.

David has a good point. Is this on an intranet or internet server?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #7

"David Wang [Msft]" <so*****@online.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
What authentication is enabled for the entire website, the page generating
this HTML, and the target POST page?

It is possible for form data to be "missing" if the original page is
authenticated but the target POST page is not authenticated due to an IE
POST optimization (if IE is POST'ing to a website it thinks is
authenticated, it will NOT send the Form data on the first POST because it
thinks it will get rejected by 401 -- however, you fool IE by making the
target POST page not require authentication -- thus, it results in a 200 but no form data sent). The optimization is reasonable in the case of
high-latency authenticated requests -- suppose the post is for 100MB --
should IE send 100MB on the first post, have it rejected by 401, then send
100MB again with the right credentials the second time?

If this is your problem, then the solution is to make your website uniform
authenticated.


Aha! This may be related...

FWIW, this is for an intranet site. I need to authenticate users on this
main page only. The rest of the site doesn't care who's browsing it.

The whole site is configured to allow anonymous access, EXCEPT for the page
in question. The page contained in the IFRAME is also set to allow anonymous
access. The only page that requires authentication (Integrated Windows
Authentication) is this main page that contains the IFRAME.

If this is the case, must I make the entire site authenticate the same, or
just these two pages?

I'll check this out shortly.

Thanks!!!

Jul 22 '05 #8
> : If this is your problem, then the solution is to make your website
uniform
: authenticated.

David has a good point. Is this on an intranet or internet server?


Intranet... I'm using the Integrated Windows Authentication on ONLY the main
page discussed here. The page contained in the IFRAME (and rest of the site)
is configured for anonymous access.

I'll have to adjust it, but unfortunately this will have to wait until
later.

Thanks guys!
Jul 22 '05 #9
The page that is accepting the POST must be authenticated. Because IE
already thinks the website is authenticated, that first POST will not have
form data, so the page accepting the POST must NOT be anonymous or else it
will get empty form data.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
"Noozer" <do*******@me.here> wrote in message
news:es4Ee.12076$%K2.8886@pd7tw1no...

"David Wang [Msft]" <so*****@online.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
What authentication is enabled for the entire website, the page generating
this HTML, and the target POST page?

It is possible for form data to be "missing" if the original page is
authenticated but the target POST page is not authenticated due to an IE
POST optimization (if IE is POST'ing to a website it thinks is
authenticated, it will NOT send the Form data on the first POST because it
thinks it will get rejected by 401 -- however, you fool IE by making the
target POST page not require authentication -- thus, it results in a 200 but no form data sent). The optimization is reasonable in the case of
high-latency authenticated requests -- suppose the post is for 100MB --
should IE send 100MB on the first post, have it rejected by 401, then send
100MB again with the right credentials the second time?

If this is your problem, then the solution is to make your website uniform
authenticated.


Aha! This may be related...

FWIW, this is for an intranet site. I need to authenticate users on this
main page only. The rest of the site doesn't care who's browsing it.

The whole site is configured to allow anonymous access, EXCEPT for the page
in question. The page contained in the IFRAME is also set to allow anonymous
access. The only page that requires authentication (Integrated Windows
Authentication) is this main page that contains the IFRAME.

If this is the case, must I make the entire site authenticate the same, or
just these two pages?

I'll check this out shortly.

Thanks!!!


Jul 22 '05 #10
Thanks... This was the problem. I've got the whole site authenticating now
and it works fine.

"David Wang [Msft]" <so*****@online.microsoft.com> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...
The page that is accepting the POST must be authenticated. Because IE
already thinks the website is authenticated, that first POST will not have
form data, so the page accepting the POST must NOT be anonymous or else it
will get empty form data.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights. //
"Noozer" <do*******@me.here> wrote in message
news:es4Ee.12076$%K2.8886@pd7tw1no...

"David Wang [Msft]" <so*****@online.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
What authentication is enabled for the entire website, the page generating this HTML, and the target POST page?

It is possible for form data to be "missing" if the original page is
authenticated but the target POST page is not authenticated due to an IE
POST optimization (if IE is POST'ing to a website it thinks is
authenticated, it will NOT send the Form data on the first POST because it thinks it will get rejected by 401 -- however, you fool IE by making the
target POST page not require authentication -- thus, it results in a 200 but
no form data sent). The optimization is reasonable in the case of
high-latency authenticated requests -- suppose the post is for 100MB --
should IE send 100MB on the first post, have it rejected by 401, then send 100MB again with the right credentials the second time?

If this is your problem, then the solution is to make your website uniform authenticated.


Aha! This may be related...

FWIW, this is for an intranet site. I need to authenticate users on this
main page only. The rest of the site doesn't care who's browsing it.

The whole site is configured to allow anonymous access, EXCEPT for the

page in question. The page contained in the IFRAME is also set to allow anonymous access. The only page that requires authentication (Integrated Windows
Authentication) is this main page that contains the IFRAME.

If this is the case, must I make the entire site authenticate the same, or
just these two pages?

I'll check this out shortly.

Thanks!!!

Jul 25 '05 #11

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

Similar topics

3
by: Jason | last post by:
Hi folks, I'm trying to create a section of a website with a unique file upload utility. The problem is that in most code and components I find to pass multipart/form data, you need to know the...
2
by: PinkBishop | last post by:
Hello All, Hope you can help. Below is the code I use to send data from form to database. Problem is if an apostrophe is entered in cQuestion field or any field for that matter the form...
8
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and...
7
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem...
15
by: http://www.visual-basic-data-mining.net/forum | last post by:
Does anyone have any idea how to transferring data from TextBox1 in form1 to textBox2 in form2..... That means after i fill in any data in textBox1 and click Next button... It will bring me to...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
4
by: pbd22 | last post by:
hi. could somebody tell me, when uploading a file, i know the form where the upload component is must have enctype=multipart/form-data but, is the same true for the form with the server code to...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
6
by: The Frog | last post by:
Hi Guys, Just wanting some opinions on best method to approach this. I am working on an Access97 db and we have two forms and an ADO connection object to contend with. The desired state is...
4
by: John Sheppard | last post by:
Hello there I was wondering if anyone could help me, I am trying to pass a typed dataset to a dialoged child form by reference. I have binding sources sitting on the child form. So to refresh...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.