How can I change the submit mailto adress(es) dynamically, based on a dropdown?

Avatar

06-10-2008

How can I change the submit mailto adress(es) dynamically, based on a dropdown?



I need to make a form with an dropdownbox.

The value selected will set the mailto value.

Other textfields have to set the cc value.



How can I do this?

Replies

Avatar

25-11-2008

Mr. Guerette, the help you give in these forums is astounding. I have been reading your threads on linking a mailto email address to the value from a dropdown list, but I must admit, I am too much of a beginner to make it work yet. I have taken your advice and placed a button in the form, made it a submit and used a placeholder mailto address. My question now is, where do I place the javascript examples you have given? If my drop down is named "EmailAddress", how do I get its value into the mailto?

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

25-11-2008

On the exit event of the dropdown list you woudl add the code I mentioned earlier. When the user leaves that field the value of the DD would be tested, the email address would be updated and then you can programmatically hit the submit or have the user do it on his/her own.



Paul

Avatar

25-11-2008

ah, okay, on the exit event. That makes sense. I appreciate your help.

Avatar

Avatar

ibwaheemi

Avatar

ibwaheemi

ibwaheemi

25-11-2008

i have done my best to follow the instructions you guys kindly give



i have added some fake email addresses to a drop down list (or DDL). and this is what i have got



ftp://mujahid.dnsdojo.net/publicfolder/dropdown_email.xdp



if it can be fixed i will leave it in the public folder for others to download and copy

Avatar

25-11-2008

I've done everything suggested previously and when the email is generated, it still places the bogus email address I added in the mailto when I placed the button. Do I need to remove the





section that was generated automatically when I placed the button?

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

26-11-2008

Send your form to livecycle8@gmail.com and I will have a look

Avatar

01-12-2008

Is there a way to execute the EmailButton through code? I have another button that gets clicked and depending on certain criteria it execute the EmailButton



thanks,

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

01-12-2008

Use the command emailbuttonname.execEvent("click");

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

01-12-2008

Are you getting any errors in the java console?