Nov23 Written by:Gary
11/23/2008 11:01 AM
Thanks to Matt Wittermann https://community.dynamics.com/blogs/cscrmblog/comments/4903.aspx for starting me on this. This is an update to his solution seperating the LinkedIn HTML code from a specific CRM entity using a parameter passed to the HTML window.
Here is my solution, there are two parts, the HTML code and two lines of Java for the forms OnLoad event.
- Create an iFrame in the form you want to add LinkedIn to.
- Set the source to About:Blank.
- Add the LinkedIn.html to a folder on your site, typically someware under the ISV folder.
- Add the OnLoad code to your form. Adjust the name of the iFrame and the path as required.
LinkedIn.html
<html>
<head>
<script src="http://www.linkedin.com/companyInsider?script&useBorder=no" type="text/javascript"></script>
<script type="text/javascript">
function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}
</script>
</head>
<body>
<center><span id="getlinkedin"></span></center>
<script type="text/javascript">
var companyName = querySt("companyname");
new LinkedIn.CompanyInsiderBox("getlinkedin",companyName);
</script>
</body>
</html> |
OnLoad Java code
var companyName=crmForm.all.name.DataValue;
crmForm.all.IFRAME_LinkedIn.src='/ISV/LinkedIn/linkedin.html?companyname=' +companyName; |
Tags: