Ya te habia puesto en otro foro como hacerlo. Se deberia hacer en 2 pasos
index.asp
Código ASP:
Ver original<%
if request("variable") <> "" then
response.write "variable = '" & request("variable") & "'"
else
response.write "no tiene datos"
end if
%>
<html>
<head>
<script>
function calcular() {
var x = 123456;
alert(x);
window.location = "index.asp?variable=" + x;
}
</script>
</head>
<body <%if request("variable") = "" then response.write "onload='calcular()'"%>>
</body>
</html>