|
-
Mar 29th, 2001, 01:18 PM
#1
Thread Starter
Junior Member
i made a page with a form where you enter a value. This is used to pass as a querystring the fontsize for the next page, and to set the font size as a cookie for another page. Where's the mistake with the cookie? (the querystring works perfectly)
the page that post the value
--------
<form name="form1" method="post" action="cookies.asp">
<input type="text" name="carattere" size="3" maxlength="1">
<input type="submit" name="Submit" value="Invia">
</form>
--------
the page that receive the value and use the querystring (works)
--------
<%
dim idim
idim=request("carattere")
strdim = idim
Response.Cookies("prova")("dimtesto")= idim
Response.cookies("prova").Expires = date + 365%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF"><font size="<%=strdim%>">
Ciao Stronzone, questo coso dovrebbe variare ogni volta. Adesso vai alla prossima pagina
<a href="cookies2.asp">prova</a> </font>
</body>
</html>
--------
the page that use the cookie
--------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF"><font size="<%request.cookies("prova")("dimtesto")%>">
Adesso c'è questa pag. qua</font>
</body>
</html>
------
the output is simply font size="".... as if my cookie as never been sent!
P.S. Can i manage cookie with the pws or should i upload to a server on the web?
PLZ help!!
-
Mar 29th, 2001, 03:26 PM
#2
Lively Member
Have you declared strdim in
the page that receive the value and use the querystring (works) ??
if not declare it as dim and try....
Sonia
-
Mar 29th, 2001, 03:29 PM
#3
Lively Member
idim=request("carattere") ???
is this should be
idim=request.item("carattere")
OR
idim=request.querystring("carattere")
Sonia
-
Mar 30th, 2001, 07:41 AM
#4
Thread Starter
Junior Member
strdim is used directly on the page and it works.
idim is used to assign a value to a cookie and it doesn't work
why?are cookies like ssi?
It's allowed to assign a variable to a cookie, isn't it?
-
Mar 30th, 2001, 07:44 AM
#5
Thread Starter
Junior Member
i forgot.
i used request("carattere") not request.form("carattere") because there are no querystring objects so the request can only be a form.
-
Mar 30th, 2001, 02:43 PM
#6
Thread Starter
Junior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|