You need to sign in to do that
Don't have an account?
jimjamz
javascript doesn't execute in HTML-BASED email ??? please advise!
Hi,
I'm still a JS beginner programmer and been killing me how this works!
Basically, i'm trying to collect response from external users via email, if they would like to attend a function or not.
I've tested the function below on IE and it works perfectly fine. The javascript function fires off when executed within a web page. It basically changes the member_status to 'accept' or 'declined'. This is the most important part which i want to get working.
The same function does not work when executed from a HTML BASED EMAIL. It will pass the original value 'Temp Value' back into SFA regardless of which button i click.
How do i get this to work?? If there are any html gurus please advise on another method or why this JS doesn't quite fire!
regards
Jimmy
--html>
--head>
--script type="text/javascript">
function Attending(strField)
{document.getElementById("member_status").value = strField;
// document.getElementById("mainForm").submit()
}
--/script>
--/head>
<body>
<form id="mainForm" >
<input size="25" id="member_status" name="member_status" value="Temp Value">
<input type="button" value="Accept" onclick="Attending('Accepted')">
<input type="button" value="Decline" onclick="Attending('Declined')">
</form>
</body>
--/html>
I'm still a JS beginner programmer and been killing me how this works!
Basically, i'm trying to collect response from external users via email, if they would like to attend a function or not.
I've tested the function below on IE and it works perfectly fine. The javascript function fires off when executed within a web page. It basically changes the member_status to 'accept' or 'declined'. This is the most important part which i want to get working.
The same function does not work when executed from a HTML BASED EMAIL. It will pass the original value 'Temp Value' back into SFA regardless of which button i click.
How do i get this to work?? If there are any html gurus please advise on another method or why this JS doesn't quite fire!
regards
Jimmy
--html>
--head>
--script type="text/javascript">
function Attending(strField)
{document.getElementById("member_status").value = strField;
// document.getElementById("mainForm").submit()
}
--/script>
--/head>
<body>
<form id="mainForm" >
<input size="25" id="member_status" name="member_status" value="Temp Value">
<input type="button" value="Accept" onclick="Attending('Accepted')">
<input type="button" value="Decline" onclick="Attending('Declined')">
</form>
</body>
--/html>
You should rethink what you're trying to do here. Why not have 2 links with a status parameter? Javascript seems like overkill in this case.
This whole thing is basically a glorified Web2Lead email instead of Web2Lead html page.
I've placed the paramater inside the button instead and it worked like a charm sending back to the Leads module in SFA
thanks Kingsley.