PC Review


Reply
Thread Tools Rate Thread

ASP if then text value

 
 
Mettá
Guest
Posts: n/a
 
      20th May 2005
my brain is no longer werkings...

I am trying to set a form to email to a potential limited number of people
with something like

<%If x=1 Then eml2="(E-Mail Removed)" End If%>
<%If x=2 Then eml2="(E-Mail Removed)" End If%>
<%If x=3 Then eml2="(E-Mail Removed)" End If%>

x is based on a form selection in a previous page. The email must not show
up, they will be used in a CDO mail so will not show up in the html. (To
stop harvesters)

So how do I get "eml2" to accept the text value?

Thanks
M



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      20th May 2005
eml2 = Request.Form("WhateverTheHeckTheFormFieldNameIs")

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Sometimes you eat the elephant.
Sometimes the elephant eats you.

"Mettá" <(E-Mail Removed)> wrote in message
news:%23B$%(E-Mail Removed)...
> my brain is no longer werkings...
>
> I am trying to set a form to email to a potential limited number of people
> with something like
>
> <%If x=1 Then eml2="(E-Mail Removed)" End If%>
> <%If x=2 Then eml2="(E-Mail Removed)" End If%>
> <%If x=3 Then eml2="(E-Mail Removed)" End If%>
>
> x is based on a form selection in a previous page. The email must not show
> up, they will be used in a CDO mail so will not show up in the html. (To
> stop harvesters)
>
> So how do I get "eml2" to accept the text value?
>
> Thanks
> M
>
>
>



 
Reply With Quote
 
Mettá
Guest
Posts: n/a
 
      20th May 2005
Sorry maybe I was not clear. The email address is not in the form.

Lets say I have 4 members of staff and people might contact any one of them
via a form. Now to protect the email address it is hidden and the form
content will be sent via CDO to any one of 3 email addresses.

So...
How can I get eml2 =variable depending on the value of "x" which is selected
on the form?

Thanks
M


"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> eml2 = Request.Form("WhateverTheHeckTheFormFieldNameIs")
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> Sometimes you eat the elephant.
> Sometimes the elephant eats you.
>
> "Mettá" <(E-Mail Removed)> wrote in message
> news:%23B$%(E-Mail Removed)...
>> my brain is no longer werkings...
>>
>> I am trying to set a form to email to a potential limited number of
>> people
>> with something like
>>
>> <%If x=1 Then eml2="(E-Mail Removed)" End If%>
>> <%If x=2 Then eml2="(E-Mail Removed)" End If%>
>> <%If x=3 Then eml2="(E-Mail Removed)" End If%>
>>
>> x is based on a form selection in a previous page. The email must not
>> show
>> up, they will be used in a CDO mail so will not show up in the html. (To
>> stop harvesters)
>>
>> So how do I get "eml2" to accept the text value?
>>
>> Thanks
>> M
>>
>>
>>

>
>



 
Reply With Quote
 
MikeR
Guest
Posts: n/a
 
      20th May 2005
Metta -
The most likely reason is the x is not a 1 or 2 or 3.
Try displaying (with a response.write and response .end to halt execution) x and
see what it is. You can put it all in one script block like
MikeR

<%
If x=1 Then
eml2="(E-Mail Removed)"
End If
If x=2 Then
eml2="(E-Mail Removed)"
End If
If x=3 Then
eml2="(E-Mail Removed)"
End If
response.write "X = " & x & " eml2 = " & eml2
response.end
%>

Mettá wrote:
> my brain is no longer werkings...
>
> I am trying to set a form to email to a potential limited number of people
> with something like
>
> <%If x=1 Then eml2="(E-Mail Removed)" End If%>
> <%If x=2 Then eml2="(E-Mail Removed)" End If%>
> <%If x=3 Then eml2="(E-Mail Removed)" End If%>
>
> x is based on a form selection in a previous page. The email must not show
> up, they will be used in a CDO mail so will not show up in the html. (To
> stop harvesters)
>
> So how do I get "eml2" to accept the text value?
>
> Thanks
> M
>
>
>

 
Reply With Quote
 
Mettá
Guest
Posts: n/a
 
      20th May 2005
Thanks Mike
I was creating a mess, now solved.


"MikeR" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Metta -
> The most likely reason is the x is not a 1 or 2 or 3.
> Try displaying (with a response.write and response .end to halt execution)
> x and see what it is. You can put it all in one script block like
> MikeR
>
> <%
> If x=1 Then
> eml2="(E-Mail Removed)"
> End If
> If x=2 Then
> eml2="(E-Mail Removed)"
> End If
> If x=3 Then
> eml2="(E-Mail Removed)"
> End If
> response.write "X = " & x & " eml2 = " & eml2
> response.end
> %>
>
> Mettá wrote:
>> my brain is no longer werkings...
>>
>> I am trying to set a form to email to a potential limited number of
>> people
>> with something like
>>
>> <%If x=1 Then eml2="(E-Mail Removed)" End If%>
>> <%If x=2 Then eml2="(E-Mail Removed)" End If%>
>> <%If x=3 Then eml2="(E-Mail Removed)" End If%>
>>
>> x is based on a form selection in a previous page. The email must not
>> show
>> up, they will be used in a CDO mail so will not show up in the html. (To
>> stop harvesters)
>>
>> So how do I get "eml2" to accept the text value?
>>
>> Thanks
>> M
>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using TEXT and &TEXT - display numbers with commas, underline text Gary Microsoft Excel Misc 2 20th Dec 2009 12:52 AM
Find multiple text in a cell and return text and text location dlhochfam3 General Discussion 2 30th Apr 2009 09:46 PM
Change background color in one text box based on text in 2nd text Gnerks Microsoft Access Reports 4 4th Aug 2008 02:52 PM
text is not visible. Hidden text and white text not the problem suzie Microsoft Word Document Management 4 30th Jan 2008 08:15 AM
Re: extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' Dan E Microsoft Excel Programming 4 30th Jul 2003 06:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 AM.