roioep
asked on
Retrieve textbox value
Hi,
I have a form with a textbox that refresh every 30 sec.
As you can see in the following code, the "Apply" link must recall the same page with the textbox value in parameter and write this value but it doesn't.
Test.asp
<%@ Language=VBScript %>
<%
sZone = Request("Zone")
if sZone <> "" then
response.write "Everything is fine"
end if
%>
<html>
<head>
<META HTTP-EQUIV="REFRESH" CONTENT="30">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor. Document">
<title>Nouvelle page 1</title>
</head>
<body>
<p><input type="text" name="txtZone" size="20" value="<%=sZone%>"></p>
<p><a href="test_get_textbox_val ue.asp?Zon e=<%=txtZo ne%>">Appl y</a></p>
</body>
</html>
Can anyone help me ?
Thanks
I have a form with a textbox that refresh every 30 sec.
As you can see in the following code, the "Apply" link must recall the same page with the textbox value in parameter and write this value but it doesn't.
Test.asp
<%@ Language=VBScript %>
<%
sZone = Request("Zone")
if sZone <> "" then
response.write "Everything is fine"
end if
%>
<html>
<head>
<META HTTP-EQUIV="REFRESH" CONTENT="30">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.
<title>Nouvelle page 1</title>
</head>
<body>
<p><input type="text" name="txtZone" size="20" value="<%=sZone%>"></p>
<p><a href="test_get_textbox_val
</body>
</html>
Can anyone help me ?
Thanks
<META HTTP-EQUIV="REFRESH" CONTENT="30;URL=thispage.a sp?txtZone =<%=Server .URLEncode (sZone)%>" >
ASKER
It doesn't work.
Also, I don't want any "FORM" in the page because of the "Auto-refresh" it will ask to "repost data" (or something like that...).
Also, I don't want any "FORM" in the page because of the "Auto-refresh" it will ask to "repost data" (or something like that...).
<SCRIPT LANGUAGE=javascript>
<!--
function reloadPage(sZone)
{
location.href='mypage.asp? Zone=' + sZone;
}
//-->
</SCRIPT>
<input type="text" name="txtZone" size="20" value="<%=sZone%>" onChange="reloadPage(this. value);">
<!--
function reloadPage(sZone)
{
location.href='mypage.asp?
}
//-->
</SCRIPT>
<input type="text" name="txtZone" size="20" value="<%=sZone%>" onChange="reloadPage(this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Exactly what I need !
Thanks to all of you !
Thanks to all of you !