Highlighted

Help! Basic if statement...

Avatar

17-07-2008

I need to create an if statement and I'm unsure how. If a radio button is chosen, I need the Submit by E-mail button to only email one address instead of the regular 4 for the other radio button.



Is this possible?

Replies

Highlighted

Avatar

21-07-2008

check this PDF



http://www.4shared.com/file/56011117/79ab392b/submit.html



It uses a regular button rather than the built in submit button



I have created a variable called emailAddresses which changes depending on which radiobutton is checked. the script on the button is as follows:



var emailAddresses;



if (form1.sub.radios.rawValue == 1)

emailAddresses = "bob@123.com";



if (form1.sub.radios.rawValue == 2)



emailAddresses = "bob@gmail.com; blobbo@hotmail.com";



event.target.submitForm({cURL:"mailto:" + emailAddresses + "?subject=Submitted Form&body=Please find attached the completed form.",cSubmitAs:"XDP",cCharset:"utf-8"});