great! Worked like a charm.
Now the second part of my problem.
I have a lot of information being filled out and then put into an email. A lot of it is optional, what they want is the non optional things not to show up in the output if it is left blank.
on (press){
if (client_name eq "") {
gotoAndStop('incorrect');
}
else {
email="email address";
subject="[desired subject to email] " + myDisplay;
var together;
together+= "Request Date = " + Date.getDate() + "%0A";
together+= "FA = " + gpn + "%0A";
together+= "Company Name = " + client_name + "%0A";
together+= "Company Type = " + newdoc.getValue() + "%0A";
together+= "Contact Name = " + clientcontact + newline + "%0A";
together+= "Checkbox1 = " + checkbox1.getValue() + " 1Value = " + value1 + newline;
together+= "Cgeckbox2= " + stock_option.getValue() + " 2Value = " + value_stockopt + newline;
together+= "Checkbox3 = " + checkbox2.getValue() + " 3Value = " + value2 + newline;
together+= "Checkbox4 = " + checkbox3.getValue() + " 4Value = " + value3 + newline;
together+= "Checkbox5 = " + deferred_comp.getValue() + " 5Value = " + value_deferred + newline;
together+= "Checkbox6= " + checkbox4.getValue() + " 6Value = " + value4 + newline;
together+= "Checkbox7 = " + checkbox5.getValue() + " 7Value = " + value5 + newline;
together+= "Checkbox8= " + plans529.getValue() + " 8Value = " + value_529 + newline;
together+= "Checkbox9 = " + exec_based.getValue() + " 9Value = " + value_execbased + newline + "%0A";
together+= "Partner1 = " + name1 + " Partner1 GPN = " + gpn1 + newline;
together+= "Partner2 = " + name2 + " Partner2 GPN = " + gpn2 + newline;
together+= "Partner3 = " + name3 + " Partner3 GPN = " + gpn3 + newline;
together+= "Partner4 = " + name4 + " Partner4 GPN = " + gpn4 + newline;
together+= "Partner5 = " + name5 + " Partner5 GPN = " + gpn5 + newline;
together+= "Partner6 = " + name6 + " Partner6 GPN = " + gpn6 + newline;
String(together);
mailto = "mailto:" + email + "?subject=" + subject + "&body=" + together;
getURL(mailto,"_self" );
}
}
on (release) {
getURL("javascript:window.close()");
}
-
- on (press){
- if (client_name eq "") {
- gotoAndStop('incorrect');
- }
- else {
- email="email address";
- subject="[desired subject to email] " + myDisplay;
- var together;
- together+= "Request Date = " + Date.getDate() + "%0A";
- together+= "FA = " + gpn + "%0A";
- together+= "Company Name = " + client_name + "%0A";
- together+= "Company Type = " + newdoc.getValue() + "%0A";
- together+= "Contact Name = " + clientcontact + newline + "%0A";
- together+= "Checkbox1 = " + checkbox1.getValue() + " 1Value = " + value1 + newline;
- together+= "Cgeckbox2= " + stock_option.getValue() + " 2Value = " + value_stockopt + newline;
- together+= "Checkbox3 = " + checkbox2.getValue() + " 3Value = " + value2 + newline;
- together+= "Checkbox4 = " + checkbox3.getValue() + " 4Value = " + value3 + newline;
- together+= "Checkbox5 = " + deferred_comp.getValue() + " 5Value = " + value_deferred + newline;
- together+= "Checkbox6= " + checkbox4.getValue() + " 6Value = " + value4 + newline;
- together+= "Checkbox7 = " + checkbox5.getValue() + " 7Value = " + value5 + newline;
- together+= "Checkbox8= " + plans529.getValue() + " 8Value = " + value_529 + newline;
- together+= "Checkbox9 = " + exec_based.getValue() + " 9Value = " + value_execbased + newline + "%0A";
- together+= "Partner1 = " + name1 + " Partner1 GPN = " + gpn1 + newline;
- together+= "Partner2 = " + name2 + " Partner2 GPN = " + gpn2 + newline;
- together+= "Partner3 = " + name3 + " Partner3 GPN = " + gpn3 + newline;
- together+= "Partner4 = " + name4 + " Partner4 GPN = " + gpn4 + newline;
- together+= "Partner5 = " + name5 + " Partner5 GPN = " + gpn5 + newline;
- together+= "Partner6 = " + name6 + " Partner6 GPN = " + gpn6 + newline;
- String(together);
- mailto = "mailto:" + email + "?subject=" + subject + "&body=" + together;
- getURL(mailto,"_self" );
- }
- }
-
- on (release) {
- getURL("javascript:window.close()");
- }
-
so basically, all those checkboxes, if one is left blank they want nothing for that or value to show.
Yes, i know it probably isn't the most effecient way to do it and the site is no no on php, so that's why I am doing it this way.
Any help would be greatly appreciated.