Bridge Fund Campaign

Let’s make an impact. You can give a one-time or recurring gift.


Your Donation

$

Honor/Memorial

Individual to be HonoredRemembered

Person to be Notified

Billing Information

Payment Method

Credit Card Information

Thank You!

Thank you for your support.

You will receive an e-mail confirmation of your gift shortly.

Your Monthly Donation

$50
$100
$150
$

Honor/Memorial

Individual to be HonoredRemembered

Person to be Notified

Billing Information

Payment Method

Credit Card Information

Thank You!

Thank you for your support.

You will receive an e-mail confirmation of your gift shortly.

/* CUSTOM CODE */ const VALID_ROLES = [ "DTS Faculty", "DTS Staff", "DTS Alumni", "Current Student", ]; (function init() { function commentContainsRole(commentText) { VALID_ROLES.forEach((role) => { if (commentText.includes(role)) return role; }); return null; } function prependToComment(comment, text) { const isVowel = (ch) => { return ['a', 'e', 'i', 'o', 'u'].includes(ch.toLowerCase()) ? true : false; // if first letter is a vowel }; let result = `I am a${isVowel(text[0]) ? 'n' : ''} ${text}\n`; // "I am a[n] " + text comment.value = result + comment.value; // set the text comment.textContent = result + comment.textContent; // set the text } function createNewDropdownRow(id) { const dropdownOptions = [`Select one`]; VALID_ROLES.forEach((role) => { dropdownOptions.push(`${role}`); }); const newRow = document.createElement("div"); newRow.classList.add("row"); // add "row" class newRow.innerHTML = `
${dropdownOptions.join('')}
`; return newRow; } document.getElementsByClassName("comments-holder")[0].prepend(createNewDropdownRow('1')); // the comments group in One-Time document.getElementsByClassName("comments-holder")[1].prepend(createNewDropdownRow('2')); // the comments group in Recurring /* Ensure textarea is repopulated before submit */ const submitBtn1 = document.querySelectorAll('input[type="submit"]')[0]; submitBtn1.addEventListener("click", () => { // check if text area contains a valid option const comment1 = document.querySelectorAll(".comments-holder textarea")[0]; // target the comment box const dropdown1 = document.getElementById("role-select-1"); prependToComment(comment1, dropdown1.value); }); const submitBtn2 = document.querySelectorAll('input[type="submit"]')[1]; submitBtn2.addEventListener("click", () => { // check if text area contains a valid option const comment2 = document.querySelectorAll(".comments-holder textarea")[1]; // target the comment box const dropdown2 = document.getElementById("role-select-2"); prependToComment(comment2, dropdown2.value); }); })();