Results 1 to 8 of 8

Thread: pass parametres in vbscript

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    7

    pass parametres in vbscript

    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.

    Shirley

  2. #2
    MarcelB
    Guest
    Hmm.. what exactly do you mean?

  3. #3
    New Member
    Join Date
    Jan 2001
    Location
    RTP, NC
    Posts
    3

    Question

    What is it that you are trying to pass and to where? The email address from the form to another email address?

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    7
    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 = "[email protected],[email protected]"
    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/passingfo...om=&strToEmail

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

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    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:
    Code:
    <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.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    7
    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
    Shirley

  7. #7
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    the syntax for a querystring is:

    &[email protected]

    but not for the 1st querystring:

    [email protected]

    & 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")
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2001
    Posts
    7
    OH EXCELLENT - Thanks so much - I will get back here when I've done it. - and it actually makes sense.

    Shirley
    Shirley

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width