Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

email address determined by radio button

Jodi1725
Level 4
Level 4

Hi all!

I am trying to code some javascript that depending on the radio button I choose will determine which email address my form goes to.  I think I am close but I am missing something.  When I click the email button it always moves the radio button to position 1 and we only get the 1st emails.  Here is what I have.

var oDoc = event.target;

if (Campus.rawValue = "1"){

    oDoc.mailDoc({

                            bUI: true,

                            cTo: "mrbecker@uillinois.edu;" + "giftadministration@uif.uillinois.edu;" + "COI@uiuc.edu",

                            cSubject:  EmployeeName.rawValue + " Donor Conflict of Interest Form  ",

                            cMsg: "Additional comments:"

                            })}

                           

else if (Campus.rawValue = "2"){

    oDoc.mailDoc({

                            bUI: true,

                            cTo: "mrbecker@uillinois.edu;" + "giftadministration@uif.uillinois.edu;" + "COI@UIC.edu",

                            cSubject:  EmployeeName.rawValue + " Donor Conflict of Interest Form  ",

                            cMsg: "Additional comments:"

                            })}

                           

else if (Campus.rawValue = "3"){

oDoc.mailDoc({

                            bUI: true,

                            cTo: "mrbecker@uillinois.edu;" + "giftadministration@uif.uillinois.edu;" + "COI@UIS.edu",

                            cSubject:  EmployeeName.rawValue + " Donor Conflict of Interest Form  ",

                            cMsg: "Additional comments:"

                            })}

Thanks for your help!

Jodi

1 Accepted Solution
radzmar
Correct answer by
Level 10
Level 10

Hi,

The first thing I see is that you use wrong operators.

if(Campus.rawValue = "1") has to be if(Campus.rawValue == "1")

View solution in original post

2 Replies
radzmar
Correct answer by
Level 10
Level 10

Hi,

The first thing I see is that you use wrong operators.

if(Campus.rawValue = "1") has to be if(Campus.rawValue == "1")

View solution in original post

Jodi1725
Level 4
Level 4

That was it!!! thank you so much!  Who would have thought one equal sign would cause so much problems.

Thank you again!!