表格不通过数据??? [英] Form not passing data ???

查看:89
本文介绍了表格不通过数据???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是一些ASP,HTML和JavaScript。它是用于维护小型数据库的
页面的一部分。这段代码确实有效,但此后已经停止了
。由于某种原因,我的表单上的数据没有传递到表单的Action属性中指定的页面

。这是在一台Windows 2000 Pro

PC上。


我将代码复制到另一台服务器(Windows XP Pro机器),它就是

按预期工作。


第一个块是位于我的主要

页面正文中间附近的数据。每个行都包括在内。有一个OnClick事件调用第二个

块中的函数。


第二个代码块调用位于

此页面上的IFrame,然后使IFrame可见。


第三个块位于IFrame页面。它应该列出从POST到此页面的表单传递的所有值

。这是空的...我所看到的只是

开始 - >< - 结束。


第四个块位于另一个ASP文件中在

主页上的IFrame中。在通过单击第二个代码块中的行执行第三个

块中的javascript之前,此IFrame不可见。它

包含一个隐藏的表单,用于将数据传递回此页面上的ASP代码。


最后一个块也位于IFrame页面上。它将值加载到此页面中的

隐藏表单,然后提交表单。这就是我有问题的地方......当调用此代码时,Alert函数显示key的

正确值,以及SUBMIT按预期发生,但

subEdit.asp页面没有收到任何表单值。


任何想法为什么Windows 2000服务器无法按预期工作?我已经尝试重新启动IIS了,虚拟目录上的属性是两台PC上相同的



Thx !!!

< span id =" 72"类= QUOT;排" onmouseover =" SelectAgent(''''',''Anne Agent'')"

onclick =" editAgent(''72'');" >

< span class =" item" style =" width:10em;">< span class =" data"> Anne

代理< / span>< / span>

< / span>

< span id =" 69"类= QUOT;排" onmouseover =" SelectAgent(''69'',''Al Over'')"

onclick =" editAgent(''69'');">

< span class =" item" style =" width:10em;">< span class =" data"> Al

Over< / span>< / span>

< / span>


//编辑代理---------------------------- --------------------

function editAgent(key){

//检索代理商信息并制作IFRAME可见

帧(" EditFrame")。getAgent(key);

EditContainer.style.display =" block";

}


<%''位于subEdit.asp页面的开头附近。

response.Write" START - >"

为Request.Form中的每个名称

response.Write name& "< br />" &安培; vbcrlf

next

response.Write"< - END"

%>


< script type =" text / javascript" language =" javascript">

//加载代理密钥&活动到表格和

提交------------------------------------- -----------

函数getAgent(key){

alert(key);

document.forms( " actionForm")。reset();

document.forms(" actionForm")。Key.value = key;

document.forms(" actionForm" ).ToDo.value ="获取";

document.forms(" actionForm")。s​​ubmit();

}

< / script>


< form name =" actionForm" ID = QUOT; ActionForm的"方法= QUOT; POST" action =" subEdit.asp"

style =" display:none;">

< input type =" text"命名= QUOT;钥匙及QUOT; ID = QUOT;钥匙及QUOT; value ="">

< input type =" text"命名= QUOT;姓名" ID = QUOT;姓名" value ="">

< input type =" text"名称= QUOT;待办事项" ID = QUOT;待办事项" value ="">

< / form>

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>

推荐答案

" Noozer"在消息新闻中写道:cl1Ee.10988
"Noozer" wrote in message news:cl1Ee.10988


s54.6574@pd7tw2no ...

:下面是一些ASP,HTML和javascript。它是用于

的页面的一部分:维护一个小型数据库。这段代码确实有效,但此后已经停止了。由于某种原因,我的表单上的数据没有传递到

页面

:在表单的Action属性中指定。这是在Windows 2000上

Pro

:PC。



:我将代码复制到另一个服务器(Windows XP专业版机器),它就是

:在那里按预期工作。



:第一个块是位于附近的数据我的主体的中间部分

:页面。每个行都包括在内。有一个OnClick事件调用

秒中的函数

:块。



:第二个代码块在页面中调用javascript函数

on

:此页面上的IFrame然后使IFrame可见。



:第三个块位于IFrame页面。它应列出所有



:从张贴到此页面的表单中传递。这是空的......我只看到了



:开始 - >< - 结束。



:第四个块位于另一个ASP文件中,位于一个IFrame上



:主页面。直到第三个

:块中的javascript通过单击位于第二个代码块中的行执行才能看到此IFrame。



:包含一个隐藏的表单,用于将数据传递回此页面上的ASP代码。



:最后一个块也位于IFrame页面上。它将值加载到此页面中的

:隐藏表单,然后提交表单。这是我在哪里
:遇到问题......当调用此代码时,Alert函数显示

:key的正确值,并且SUBMIT按预期发生,但是

:subEdit.asp页面没有收到任何表格值。



:任何想法为什么Windows 2000服务器无法正常工作?我已经尝试重新启动IIS和虚拟目录上的属性



:两台PC上的相同。



:Thx !!!





: < span id =" 72"类= QUOT;排" onmouseover =" SelectAgent(''''',''Anne Agent'')"

:onclick =" editAgent(''72'');" >

:< span class =" item" style =" width:10em;">< span class =" data"> Anne

:代理商< / span>< / span>

:< / span>

:< span id =" 69"类= QUOT;排" onmouseover =" SelectAgent(''69'',''Al Over'')"

:onclick =" editAgent(''69'');">

:< span class =" item" style =" width:10em;">< span class =" data"> Al

:Over< / span>< / span>

:< / span>







://编辑代理商 - ----------------------------------------------

:function editAgent(key){

://检索代理商信息并使IFRAME可见

:frames(" EditFrame")。getAgent(key) ;

:EditContainer.style.display =" block";

:}



:< br $> b $ b:

:<%''位于subEdit.asp页面的开头附近。

:response.Write" START - > ;"

:对于Request.Form中的每个名称

:response.Write name& "< br />" &安培; vbcrlf

:next

:response.Write"< - END"

:%>







:< script type =" text / javascript" language =" javascript">

://加载代理密钥&活动到表格和

:提交------------------------------------ ------------

:函数getAgent(key){

:alert(key);

: document.forms(" actionForm")。reset();

:document.forms(" actionForm")。Key.value = key;

:document。表格(actionForm)。ToDo.value ="获取" ;;

:document.forms(" actionForm")。s​​ubmit();

:}

:< / script>







: < form name =" actionForm" ID = QUOT; ActionForm的"方法= QUOT; POST" action =" subEdit.asp"

:style =" display:none;">

:< input type =" text"命名= QUOT;钥匙及QUOT; ID = QUOT;钥匙及QUOT; value ="">

:< input type =" text"命名= QUOT;姓名" ID = QUOT;姓名" value ="">

:< input type =" text"名称= QUOT;待办事项" ID = QUOT;待办事项" value ="">

:< / form>


您是否在W2K系统上运行带有脚本阻止的防病毒软件?


-

Roland Hall

/ *这些信息的分发是希望它有用,但是

没有任何保证;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp
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




" Roland Hall" <没有人@无处>在消息中写道

news:%2 **************** @ tk2msftngp13.phx.gbl ...

"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
" Noozer"在消息新闻中写道:cl1Ee.10988
"Noozer" wrote in message news:cl1Ee.10988


这篇关于表格不通过数据???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆