-
Notifications
You must be signed in to change notification settings - Fork 7
/
script.js
130 lines (113 loc) · 3.54 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
var columns = {};
function go()
{
// Access column info:
var starter = "http://yoururl.com/?name=[NAME]&email=[EMAIL]"
var x = columns;
var y = document.getElementById("list").value;
var selection = list.options[list.selectedIndex].value;
//start if/else:
if (selection == "") {
document.getElementById('demo').innerHTML = selection + ""
}
else
{
var txt = starter.replace("[NAME]", columns[selection].firstName).replace("[EMAIL]", columns[selection].email);
document.getElementById("demo").innerHTML = txt;
}
};
//-------------------------------------------------------//
function setup()
{
columns['MC'] = {
name: 'MailChimp',
firstName: '*|NAME|*',
lastName:'',
email:"*|EMAIL|*",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['AW'] = {
name: 'aWeber',
firstName: '{!name}',
lastName:'',
email:"{!email}",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['CC'] = {
name: 'Constant Contact',
firstName: 'Subscriber.FirstName',
lastName:'Subscriber.LastName',
email:"Subscriber.Email",
phone: "Subscriber.HomePhoneNumber",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['HS'] = {
name: 'HubSpot',
firstName: '*|NAME|*',
lastName:'',
email:"*|EMAIL|*",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['M'] = {
name: 'Marketo',
firstName: '{{Lead.Full Name}}',
lastName:'',
email:"{{Lead.Email Address}}",
phone: "{{Lead.Phone Number}}",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['AC'] = {
name: 'Active Campaign',
firstName: '%FULLNAME%',
lastName:'',
email:"%EMAIL%",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['P'] = {
name: 'Pardot',
firstName: '%%assigned_user.first_name%%',
lastName:'%%assigned_user.last_name%%',
email:"%%assigned_user.email%%",
phone: "%%assigned_user.phone%%",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['E'] = {
name: 'Emma',
firstName: '[% member:name_first default="first name" %]',
lastName:'[% member:name_last default="last name" %]',
/*email:"[% member:email default="email"%]",
phone: "[% member:phone default="phone" %]",*/
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['GR'] = {
name: 'Get Response',
firstName: '[[name]]',
lastName:'',
email:"[[email]]",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['CM'] = {
name: 'Campaign Monitor',
firstName: '[fullname]',
lastName:'',
email:"[email]",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['iC'] = {
name: 'iContact',
firstName: '[fname]',
lastName:'[lname]',
email:"[[email]",
phone: "[phone]",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['VR'] = {
name: 'Vertical Response',
firstName: '{FIRST_NAME}',
lastName:'{LAST_NAME}',
email:"{EMAIL_ADDRESS}",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
columns['MM'] = {
name: 'Mad Mimi',
firstName: '(firstname)',
lastName:'(lastname)',
email:"(email)",
phone: "",
fullname: function() {return this.firstName + " " + this.lastName;}};
};