469,317 Members | 1,957 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Help with variables

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

Mar 6 '07 #1
5 1320
Rabel wrote:
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
x_*************@something.com
%>
<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" va***********@something.com>

--
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"
Mar 6 '07 #2
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
x_email=myem...@something.com
%>
<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" value=myem...@something.com>

--
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

Mar 6 '07 #3
Rabel wrote:
>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
x_email=myem...@something.com
%>
<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" value=myem...@something.com>

--
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
<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"
Mar 6 '07 #4
<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

Mar 6 '07 #5
On Mar 6, 5:14 pm, "Rabel" <R...@Creativeness.comwrote:
<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
Sorry I realized you misspelled Request, I fixed that and it still
doesnt pass it through - any idea whats going on

Mar 7 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robert | last post: by
1 post views Thread by Dave Smithz | last post: by
9 posts views Thread by hope | last post: by
11 posts views Thread by dhnriverside | last post: by
6 posts views Thread by karafire2003 | last post: by
2 posts views Thread by hcaptech | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.