Because things in insurance are picky and because every state does the same thing differently, we need to determine which state is important to a particular request. So, having determined the name of the state in question (Garaging_State) I need to insert the name of the state into the subject line of an email. This seems so simple; but, I just can't get my mind wrapped around it.
In other words, if the Garaging_State is Indiana, the subject line of the email should read: "I need surplus lines tax forms to bind a Truckers GL submission in Indiana"
The following code doesn't work.
-
<a id="sendmail" href="javascript:emailAmanda()">
-
-
function emailAmanda(){
-
var garagingState = document.getElementById('Garaging_State').value;
-
var message2Amanda = "mailto:amandas@ubinc.com?subject=I need surplus lines tax forms to bind a Truckers GL submission in "+document.getElementById('Garaging_State').value;
-
var href = link.getAttribute("href");
-
link.setAttribute("href", message2Amanda);
-
}
-
Please show me how to make this work.