Help with variables

R

Rabel

I am new to asp and have tried a few things and cannot get it to
work. I thought this code
<input type="hidden" name="x_cust_id" value="<%= x_email %>">
would work for making the x_cust_id value equal what was put in the
x_email field - but that doesnt work - any idea what Im doing wrong.

Thanks,
Randy
 
B

Bob Barrows [MVP]

Rabel said:
I am new to asp and have tried a few things and cannot get it to
work. I thought this code
<input type="hidden" name="x_cust_id" value="<%= x_email %>">
would work for making the x_cust_id value equal what was put in the
x_email field - but that doesnt work - any idea what Im doing wrong.

Thanks,
Randy

1. You haven't properly defined "doesn't work". What are the symptoms that
lead you to believe it is not working? Better yet, show us the result you
expect to achieve, followed by the result you are actually getting
2. You haven't shown enough code for us to help you. From what I can see
"x_email" is a variable, not a field. The following works for me:

<%
dim x_email
[email protected]
%>
<html><body>
<input type="hidden" name="x_cust_id" value="<%= x_email %>">
</body></html>

When I run this page and View Source, here is what I see:

<input type="hidden" name="x_cust_id" [email protected]>
 
R

Rabel

1. You haven't properly defined "doesn't work". What are the symptoms that
lead you to believe it is not working? Better yet, show us the result you
expect to achieve, followed by the result you are actually getting
2. You haven't shown enough code for us to help you. From what I can see
"x_email" is a variable, not a field. The following works for me:

<%
dim x_email
[email protected]
%>
<html><body>
<input type="hidden" name="x_cust_id" value="<%= x_email %>">
</body></html>

When I run this page and View Source, here is what I see:

<input type="hidden" name="x_cust_id" [email protected]>

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Thanks Bob,
well its part of a cart but the email field is
<input name="x_email" type="text" id="x_email" value="">
and the form is
<form name="checkout_NOadsf_complete" method="POST" action="https://
secure.adfadsf.net/asdf/asdfdafsfd.dll">
when it goes to the next page I want the field x_cust_id to equal what
was entered in the email field - right now I am getting "x_email" in
this field not the variable

Thanks
 
B

Bob Barrows [MVP]

Rabel said:
Thanks Bob,
well its part of a cart but the email field is
<input name="x_email" type="text" id="x_email" value="">
and the form is
<form name="checkout_NOadsf_complete" method="POST" action="https://
secure.adfadsf.net/asdf/asdfdafsfd.dll">
when it goes to the next page I want the field x_cust_id to equal what
was entered in the email field - right now I am getting "x_email" in
this field not the variable

Thanks
<input type="hidden" name="x_cust_id" value="<%=
Tequest.Form("x_email") %>">
 
R

Rabel

<input type="hidden" name="x_cust_id" value="<%=
Tequest.Form("x_email") %>">

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"- Hide quoted text -

- Show quoted text -

When I put that in I get this error


Microsoft VBScript runtime error '800a01a8'

Object required: ''

/forms/membershipasp.asp, line 536

that is the line that im changing too
 
R

Rabel

When I put that in I get this error

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/forms/membershipasp.asp, line 536

that is the line that im changing too

Sorry I realized you misspelled Request, I fixed that and it still
doesnt pass it through - any idea whats going on
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,379
Messages
2,571,945
Members
48,806
Latest member
LizetteRoh

Latest Threads

Top