PDA

View Full Version : Sending an email with Chained Select Menu



leegodden
11-28-2012, 02:23 PM
1) Script Title: Chained Select Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chainedmenu/index.htm

3) Describe problem: HI there I have installed the' Chained Select Menu' Script and have it working perfectly. However I am using the three chained drop downs in an email form with some other text fields. The problem is I cant retrieve the populated values selected by the user in the chained drop downs. I know the form is working because I can retrieve the values of other fields on the form. When I view the email sent all I can see is the label of the chained drop downs. I am using this script at my place of work with Classic ASP to send the form. I'm guessing that the JavaScript isn't actually on the server so cant be shown, but I'm not the greatest programmer so cant think of a solution would really appreciate some help on this one as I'm struggling to get this done. have included relevant code below.

thanks

Lee

The 3 files I'm using (along with the config.js and chainedmenu.js files) are booking form.asp and booking-form-action.asp I have provided a relevant snippet from each below to help

**** booking form.asp *****


<head>
<script language="javascript" src="js/chainedmenu.js"></script>
<script language="javascript" src="js/config.js"></script>

</head>

<body onload="initListGroup('chainedmenu', document.contactform.coursetype, document.contactform.course, document.contactform.coursedate, 'savestate')">

<%
If Request.Querystring("sent") = "true" Then
%>

<h2>Thank you!</h2>

<%
Else
%>

<form name="contactform" method="post" action="booking-form-action.asp">
<input type="hidden" name="formAction" value="sent" />

<label id="coursetype">Course type:</label><br />
<select name="coursetype" id="coursetype" class="formStyle" style="width:335px;" ></select>

<label id="course">Course:</label><br />
<select name="course" class="formStyle" style="width:425px;" ></select>

<label id="coursedate">Date:</label><br />
<select name="coursedate" class="formStyle" style="width:300px;" ></select>

---- other non relevant fields here -----

-- not using original submit 'Go' button
<label for="submit">&nbsp;</label>
<input class="submitButton" type="submit" value="submit" name="submit" />


</form>

---End of booking form.asp

*** booking-form-action.asp ****
<%
If Request.Form("formAction") = "sent" Then


coursetype = Request.Form("coursetype")
course = Request.Form("course")
coursedate = Request.Form("coursedate")


---- other ASP code here
email_body = ""
email_body = email_body & "Course type: " & coursetype & vbcrlf
email_body = email_body & "Course selected: " & course & vbcrlf
email_body = email_body & "Course Date: " & coursedate & vbcrlf