What do you need help with?

Linex Code for Framing Linex in Your Intranet

Follow

The following code is used for integrating Linex into your intranet.  Please refer to Framing Linex in your Intranet for guidance. 

 

<script type="text/javascript">
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', loadUserDetails);

var waitDialog;

function loadUserDetails() {
 waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Working to identify You..', 'Retrieving your email address to enhance your Linex experience...', 140, 500);
 clientContext = SP.ClientContext.get_current();
 user = clientContext.get_web().get_currentUser();
 clientContext.load(user);
 clientContext.executeQueryAsync(onQuerySucceeded, onQueryFailed);
}

function onQuerySucceeded() {
 waitDialog.close();
 document.getElementById('retrievingEmailAddress').style.display = 'none';
 if(user.get_email() == "")
 document.getElementById('retrievingEmailAddressError').style.display = 'block';
 else {
 ifrm = document.createElement("IFRAME");
 ifrm.setAttribute("src", "http://ca.linexsystems.com?customHeader=true&user_email=" + user.get_email());
 ifrm.style.width = 640+"px";
 ifrm.style.height = 480+"px";
 document.getElementById('linexframed').appendChild(ifrm);
 }
}

function onQueryFailed(sender, args) {
 waitDialog.close();
 alert("Error when retrieved user's profile information: " + args.get_message());
}
</script> 
<div id="retrievingEmailAddress" width="100%" height="100%" style="display: block;">Please wait while we retrieve your email address...</div>
<div id="retrievingEmailAddressError" width="100%" height="100%" style="display: none;">Error: User&#39;s email address is not defined or could not be retrieved.</div>
<div id="linexframed" width="100%" height="100%" style="display: block;">&#160;</div> 
Have more questions? Submit a request

Comments