Do the following.1) Place a button control on the form and change the
Control Type to Submit.2) Copy the below code and paste it in the
preSubmit event of the button.3) You do not need to call the click
event. So I commented it out.if (Program.rawValue != null) { var
strEmail = ""; if(Program.rawValue == Division.rawValue){ strEmail =
"mailto:" + Program.rawValue + "?subject=Email Subject"; } else{
strEmail = "mailto:" + Program.rawValue + "?cc=" + Division.rawValue +
"&subject=Email Subject"; }...