I have a page which requests some input from the user, into a text box. Further down the page I want to display the text typed into the text box.
Can anyone help me achieve this ? Thanks.
I have a page which requests some input from the user, into a text box. Further down the page I want to display the text typed into the text box.
Can anyone help me achieve this ? Thanks.
Try this:
Code:<html> <head> </head> <body> <script type="text/javascript"> function changeThis(){ var formInput = document.getElementById('theInput').value; document.getElementById('newText').innerHTML = formInput; } </script> <p>You wrote: <span id='newText'></span> </p> <input type='text' id='theInput' value='Write here' /> <input type='button' onclick='changeThis()' value='See what you wrote'/> </body> </html>
Try this example but dont forget to save this as .asp extension
<html>
<body>
<form action="demo_reqquery.asp" method="get">
Your name: <input type="text" name="fname" size="20" />
<input type="submit" value="Submit" />
</form>
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
Response.Write("How are you today?")
End If
%>
</body>
</html>
Bookmarks