Link to home
Start Free TrialLog in
Avatar of roioep
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_value.asp?Zone=<%=txtZone%>">Apply</a></p>

</body>

</html>


Can anyone help me ?

Thanks
Avatar of robbert
robbert

<META HTTP-EQUIV="REFRESH" CONTENT="30;URL=thispage.asp?txtZone=<%=Server.URLEncode(sZone)%>">
Avatar of roioep

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...).
<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);">
ASKER CERTIFIED SOLUTION
Avatar of aGuyNameRay
aGuyNameRay

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of roioep

ASKER

Exactly what I need !

Thanks to all of you !