|
|
|
|
|
| | |
| |
Active Server Pages asp source code database MS SQL MS Access .mdb adovbs.inc cookies calendar codes sql commands scripts asp programming tutorials iis web server components CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
|
|
Subject: |
Re: Passing information using javascript from client to server |
|
From: |
Van Duong |
|
Date: |
5/19/2000 9:33:49 PM |
|
IP: |
202.167.121.197 |
The probem is that You forgot return a value from
prompt("input your age", theage)
So try this
<HTML>
<BODY><script language="javascript">
function doit(){
var theage;
if (theage = prompt("input your age", "Your Age")){
window.location.href=submit.asp?age=+ theage;
}
}
//theage is default value??null??undefined??how to get users input??
</script>
...
<form>
<input type="button" onclick="doit()" value="submit it">
</from> </BODY>
</HTML>
At server side
<%
dim age
age = request.querystring("age")
Response.Write(age)
%>
It will work properly
Hope this help
Van Duong |
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|