Results 1 to 14 of 14
Jul 26, 2007, 22:36 #1
- Join Date
- Jul 2007
- 0 Post(s)
- 0 Thread(s)
One of the main reasons I purchased the book was to find out more about AJAX and was pleased to find this generic form submission section that uses the Contact form as an example. I have been pulling my hair out trying to get this form to work and am not getting anywhere.
My form_mailer.cfm page is a really simple coldfusion insert page, code below.
<!--- Set default value for checkbox if not checked ---> <cfparam name="form.contactNewsletter" default="No"> <cfquery datasource="MyDB" name="FormInsert"> insert into ContactForm(contactName, contactEmail, contactType, contactMessage, contactNewsletter, contactMethod) values ('#form.contactName#','#form.contactEmail#','#form.contactType#','#form.contactMessage#','#form.contactNewsletter#','#form.contactMethod#') </cfquery>
requester.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); requester.open("POST", form.getAttribute("action"), true); requester.onreadystatechange = function()
Any others having this problem? or suggestions for fixing would be appreciated.