Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Software > Adobe Software > Dreamweaver

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-2008, 08:03 AM
Sutton808303
 
Posts: n/a
ASP help!

Hi evryone,

I am having a nightmare getting my radio buttons to return results. It is just
a simple contact form with name, email and 'i will' & 'will not' be attending.
Ive looked everywhere for help on this and im either putting it in the wrong
place or just doing it wrong. Any help would be very much appreciated. Thanks
in advance. Code below:-

contact.html:-

<div class="text_col_left">
<h1>Champagne Canapés Reception RSVP</h1>
<p><img src="images/component_images/line_break_480.gif" alt=""
width="470" height="1" /></p>
<h2>PAGE INTRO TEXT<br />
<br />
</h2>
<h2>Please R.S.V.P. by 14th August 2008 by using the form below or by
phone: <br />
???????????</h2>
<p><img src="images/component_images/line_break_480.gif" alt=""
width="470" height="1" /> </p><form method="POST"
action="http://www.MYSITE.COM/contact.asp">
<h2>Please complete the following:<br />
</h2>
<p><img src="images/component_images/line_break_480.gif" alt=""
width="470" height="1" /></p>
<p>Full Name:<br />
<input name="Name" type="text" size="45" />
</p>
<p>Email:<br />
<input name="Email" type="text" size="45" />
</p>
<p><img src="images/component_images/line_break_480.gif" alt="" width="470"
height="1" /><br />
</p>
<p>
<label>
<input name="attend" type="radio" id="attend_0" value="radio"
checked="checked" />
I will be attending</label>
<br />
<label>
<input type="radio" name="attend" value="attend" id="attend_1" />
I will NOT be attending</label>
<br />
</p>
<p><img src="images/component_images/line_break_480.gif" alt="" width="470"
height="1" /><br />
</p>
<p>
<input type="submit" name="submit" value="Submit" />
</p>
</form>
</div>


ASP FORM:-

<%

' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim Name
Dim Email

' get posted data into variables
EmailFrom = "me@mysite.com"
EmailTo = "me@mysite.com"
Subject = "Derby RSVP"
Name = Trim(Request.Form("Name"))
Email = Trim(Request.Form("Email"))


' prepare email body text
Dim Body
Body = Body & "Name: " & Name & VbCrLf
Body = Body & "Email: " & Email & VbCrLf


' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send

' redirect to success page
Response.Redirect("thanks.html")
%>


Reply With Quote
  #2 (permalink)  
Old 07-24-2008, 08:19 AM
Ted Dawson
 
Posts: n/a
Re: ASP help!

> I am having a nightmare getting my radio buttons to return results. It is
> just
> a simple contact form with name, email and 'i will' & 'will not' be
> attending.
> Ive looked everywhere for help on this and im either putting it in the
> wrong
> place or just doing it wrong. Any help would be very much appreciated.
> Thanks
> in advance. Code below:-



> ASP FORM:-
>
> <%
>
> ' declare variables
> Dim EmailFrom
> Dim EmailTo
> Dim Subject
> Dim Name
> Dim Email
>
> ' get posted data into variables
> EmailFrom = "me@mysite.com"
> EmailTo = "me@mysite.com"
> Subject = "Derby RSVP"
> Name = Trim(Request.Form("Name"))
> Email = Trim(Request.Form("Email"))
>
>
> ' prepare email body text
> Dim Body
> Body = Body & "Name: " & Name & VbCrLf
> Body = Body & "Email: " & Email & VbCrLf
>
>
> ' send email
> Dim mail
> Set mail = Server.CreateObject("CDONTS.NewMail")
> mail.To = EmailTo
> mail.From = EmailFrom
> mail.Subject = Subject
> mail.Body = Body
> mail.Send
>
> ' redirect to success page
> Response.Redirect("thanks.html")
> %>




What is the error message? The component you are using (cdonts) is
deprecated, and it is likely that your host does not have it installed on
the server. Ask your host what email components they support.



Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 08:43 AM
Sutton808303
 
Posts: n/a
Re: ASP help!

Hi Ted,

Thanks for the quick reply. My host is cool with the cdonts and the form comes
through fine. Just not with any info from the radio buttons.

I should of mentioned that the ASP code above has any reference to the radio
buttons removed (i thought this might be best)

Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 09:50 AM
Sutton808303
 
Posts: n/a
Re: ASP help!

Is there an extension that I can get that will help me insert the forms and write the ASP code for me? What do you guys normally use?
Reply With Quote
  #5 (permalink)  
Old 07-24-2008, 02:40 PM
Mangler
 
Posts: n/a
Re: ASP help!

On Jul 24, 5:50*am, "Sutton808303" <webforumsu...@macromedia.com>
wrote:
> Is there an extension that I can get that will help me insert the forms and write the ASP code for me? What do you guys normally use?


check out Web Assist Universal Email......
http://www.webassist.com/professiona...ign=Excha nge
Reply With Quote
  #6 (permalink)  
Old 07-25-2008, 12:53 AM
Ted Dawson
 
Posts: n/a
Re: ASP help!

> Thanks for the quick reply. My host is cool with the cdonts and the form
> comes
> through fine. Just not with any info from the radio buttons.
>
> I should of mentioned that the ASP code above has any reference to the
> radio
> buttons removed (i thought this might be best)



OK, my bad. I didn't thorougly read your post.

For the radio button in the form:
<label>
<input name="attend" type="radio" id="attend_0" value="Yes, I will
attend" checked="checked" />
I will be attending
</label>
<br />
<label>
<input type="radio" name="attend" value="No, I will not attend"
id="attend_1" />
I will NOT be attending
</label>
<br />

and for the code to carry the radio button value:

' get posted data into variables
EmailFrom = "me@mysite.com"
EmailTo = "me@mysite.com"
Subject = "Derby RSVP"
Name = Trim(Request.Form("Name"))
Email = Trim(Request.Form("Email"))
Attend = Trim(Request.Form("attend")) 'this is a new line


' prepare email body text
Dim Body
Body = Body & "Name: " & Name & VbCrLf
Body = Body & "Email: " & Email & VbCrLf
Body = Body & "Will I attend? " & Attend & VbCrLf 'this is a new
line


This ought to work, but I didn't test it.

Here's an extension that might help if this doesn't work:
http://www.dwzone-it.com/ExtensionFr...ree_how_vc.asp

Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Software > Adobe Software > Dreamweaver


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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



All times are GMT. The time now is 11:54 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109