ASP is processed *before* the results are sent to the browser.  When the
user requests the page it runs this code server-side;

Session("namevalue")= this.name.value

It doesn't know what "this" is so throws that error.  You will need to
submit your form to an ASP page to store the form's value in the Session,
and maybe re-direct to your intended page after that.

-----Original Message-----
From: clararc2004 [mailto:[EMAIL PROTECTED] 
Sent: 20 October 2004 6:37
To: [EMAIL PROTECTED]
Subject: [ASP] Session to store form element value





Hi!
 
could anyone help?
I have a question related with the use of Session to store the value 
of a form element.
I need that in order to pass this value to a "redirected" asp page, 
in a form which has action="xxxx.pl".
 
if I use the command:
onSubmit='<% Session("namevalue")= this.name.value %>' 
 
I get the error: Microsoft VBScript error '800a01a8' Object 
required: '' 

I post the whole code:
<Form name="form" method="POST" action="xxxxxx/FormMail.pl" 
onSubmit='<% Session("namevalue")= this.name.value %>'>    
<input type = "hidden" name="recipient" value="[EMAIL PROTECTED]"> <input type
= "hidden" name="redirect" 
value="http://xxx.xxx.xxx/confirm.asp";>
<input id="name" type="text" size="30"><input type="submit" 
name="send" value="submit!"> 
<input name="cancel" type="reset" value="cancel" > 
</form>

I've tried with 
onSubmit='<% Session("namevalue")=Request.form("name") %>' but it 
doesn't work, either I use runat="server" or not.
 
Thank you very much for all!
Clara









---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 




The contents of this email and any attachments are sent for the personal attention
of the addressee(s) only and may be confidential.  If you are not the intended
addressee, any use, disclosure or copying of this email and any attachments is
unauthorised - please notify the sender by return and delete the message.  Any
representations or commitments expressed in this email are subject to contract. 
 
ntl Group Limited



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to