PDA

Click to See Complete Forum and Search --> : pass parametres in vbscript


Shirley
May 9th, 2001, 08:35 AM
Can anyone help... I have a asp form which posts to 2 email addresses (not a problem) using asp mail and vbscript.

I need to have the email address in the form as a variable so I can send (passing parametres) with the link when they click submit. This email address is already known and hidden.

God does that make any sense - If anyone can help, just on the sending anything to be held in a variable on the form would help.

:confused:

MarcelB
May 9th, 2001, 09:27 AM
Hmm.. what exactly do you mean? :)

nbaker
May 9th, 2001, 09:30 AM
What is it that you are trying to pass and to where? The email address from the form to another email address?

Shirley
May 9th, 2001, 09:46 AM
this is my latest effort

this is in the link

the strToEmail is where I normally hold email address form is going to be posted to

you can see form by visiting allefinance.com/ordernow.asp
This is asp page using vbscript so you cannot see anything really interesting through view source so I will copy it



'Shirleys code starts
strcompanyname = Trim(Request.Form("txtcompanyname"))
strcompanydomainname = Trim(Request.Form("txtcompanydomainname"))
strcompanydesc = Trim(Request.Form("txtcompanydesc"))
'Shrleys code ends

strSubject = "Question Form / AlleFinance.com"
strToEmail = "shirley@allecom.com,finance@allecom.com"
strFormBody = ""

this all works fine by the way as it is... email in a link to go into strToEmail... Any help much appreciated.


http://www.allefinance.com/passingform.asp?shirley@allecom.com=&strToEmail

I want to write in the link above an email address and have it sit in the strToEmail variable ?

monte96
May 9th, 2001, 01:24 PM
Ok... if you are using an HTML form and you are submitting to the next page, your path of least resistance is to put the email addresses into a hidden textbox that will be passed to the next page:

<INPUT type=hidden name=emails id=emails value="<%=strToEmail%>">


Now, on the other hand, if you want to pass them using a querystring but without submitting a form, you will need to urlencode the email strings before you put them into a querystring.

Shirley
May 9th, 2001, 05:35 PM
Thanks for your reply - will get back to you on it tomorrow - if I get somewhere - urlencode ????? what's this ?

the email address needs to be in the link itself (placed by me) which then shows form but doesn't submit it yet and sends the email address into the variable.

www.allefinance.com/email.asp?***** this is what I dont know.

www.allefinance.com/email.asp

look at this site above you will see what I am asking about.

shirley

monte96
May 9th, 2001, 05:41 PM
the syntax for a querystring is:

&to=shirley@websitedsgn.com

but not for the 1st querystring:

email.asp?to=shirley@websitedsgn.com

& is a separator for multiple querystrings and is not required for just one.

On the email.asp page, you will need to look for the querystring (Not the FORM object) and put it into the variable if it exists.

strEmail = Request.Querystring("to")

Shirley
May 10th, 2001, 06:32 AM
OH EXCELLENT - Thanks so much - I will get back here when I've done it. - and it actually makes sense.

Shirley