Forums
This topic is locked
1 form, 2 actions....HELP! PLEASE!
Posted 23 May 2003 14:59:47
1
has voted
23 May 2003 14:59:47 Jennifer Glinski posted:
I am trying to make a form perform two different actions. What makes it hard for me is that one of the actions is to insert the data into a database on our CRM's server in CA. I do not have access to that code, I only have a link to use for the action. I also want to send the form to an asp page that generates an email to the email inserted in the form and places a cookies on their computer using the First name from the form. I tried the JM_postTo behavior and only one would work or I would get an "HTTP 405 - Resource not allowed" error. Is there some sort of javascript I can use to run both actions? On the form I also use a validateForm() function for the Onclick attribute on the submit button. I don't know how to link everything together to get it to work. I am kind of new to javascript and asp....please help if possible. Thanks, Jen Replies
Replied 23 May 2003 16:27:29
23 May 2003 16:27:29 Dan Berdusco replied:
JLee,
You could try this... have the user fill out the form (page1.asp) and have the action of that form be another asp page (I will call it page2.asp). On page2.asp, use CDONTS or something to send all of the form information from page1.asp. Also, on page2.asp, have another form which will only include hidden form fields. Have the default values of each of the hidden form fields be <pre id=code><font face=courier size=2 id=code><%request.form("formfieldFromPage1"
%></font id=code></pre id=code>. After you have made enough hidden fields to represent all of the fields from the form on page1.asp, you will need to figure out how to submit the data to your CRM server (I cannot tell you how to do that). But you will also need to be able to submit your form on page2.asp without having the user push any buttons. So, download and install Massimo's extension for UD called "FormManager". Select your body tag, and then go to: behaviours >> massimocorner >> Form Manager, then set the action of the form to "Submit"... This should submit the form information when the page loads.
Hope this helps.
You could try this... have the user fill out the form (page1.asp) and have the action of that form be another asp page (I will call it page2.asp). On page2.asp, use CDONTS or something to send all of the form information from page1.asp. Also, on page2.asp, have another form which will only include hidden form fields. Have the default values of each of the hidden form fields be <pre id=code><font face=courier size=2 id=code><%request.form("formfieldFromPage1"

Hope this helps.