Thursday, October 3, 2019
Sample Code of APIââ¬â¢s Controls in Written Javascript
Sample Code of APIââ¬â¢s Controls in Written Javascript    use strict  //function to load Facebook JavaScript.  var loadFacebookJS = function () {  blockUI();  if (!$(#modalWindowDivControl #FacebookDivision).contents().find(.fb-share-button).attr(data-href)) {  unBlockUI();  (function () {  var e = document.createElement(script);  e.type = text/javascript;  e.src = document.location.protocol + //connect.facebook.net/en_US/all.js#xfbml=1appId=297301533752770;  e.async = true;  document.getElementById(fb-root).appendChild(e);  } ());  }  else {  setTimeout(loadFacebookJS, 200);  }  }  // freez the screen until the whole page loads  function blockUI(controllerId, message) {  controllerId = controllerId || ctl00_gridDiv;  message = message || Processing Please Wait;  message =     + message +    ;  if ($(#blockMessage).length == 0) {  $(# + controllerId).append($(  ).attr(id, blockMessage).css(display, none).html(message));  } else {  $(#blockMessage).html(message);  var controller = $(# + controllerId).data();  if (controller != undefined  controller != null  controller[blockUI.isBlocked] != undefined  controller[blockUI.isBlocked] != null  controller[blockUI.isBlocked] == 1)  return;  }  $(# + controllerId).block({  message: $(#blockMessage),  css: {  border: none,  padding: 15px,  backgroundColor: #eee,  -webkit-border-radius: 10px,  border-radius: 10px,  opacity: .9,  color: #444,  display: inline,  width: 35%  }  });  }  function unBlockUI(controllerId) {  controllerId = controllerId || ctl00_gridDiv;  $(# + controllerId).unblock();  }  LinedIn Js file  use strict  // funtion to check and load linkedin JS.  var LoadLinkedinJS = function () {  blockUI();  if (!$(#modalWindowDivControl #LinkedinFrame).contents().find(#LinkedinButton).attr(data-url)) {  unBlockUI();  $.getScript(http://platform.linkedin.com/in.js);  }  else {  setTimeout(LoadLinkedinJS, 200);  }  }  // freez the screen until the whole page loads  function blockUI(controllerId, message) {  controllerId = controllerId || ctl00_gridDiv;  message = message || Processing Please Wait;  message =     + message +    ;  if ($(#blockMessage).length == 0) {  $(# + controllerId).append($(  ).attr(id, blockMessage).css(display, none).html(message));  } else {  $(#blockMessage).html(message);  var controller = $(# + controllerId).data();  if (controller != undefined  controller != null  controller[blockUI.isBlocked] != undefined  controller[blockUI.isBlocked] != null  controller[blockUI.isBlocked] == 1)  return;  }  $(# + controllerId).block({  message: $(#blockMessage),  css: {  border: none,  padding: 15px,  backgroundColor: #eee,  -webkit-border-radius: 10px,  border-radius: 10px,  opacity: .9,  color: #444,  display: inline,  width: 35%  }  });  }  function unBlockUI(controllerId) {  controllerId = controllerId || ctl00_gridDiv;  $(# + controllerId).unblock();  }  Job Share Modal window  use strict  //This JavaScript is Main script for all Social Networks Connections and Communication.  //Created on 03/04/2014  //Created by Devank Agarwal  var SocialNetworkingJavaScript = function () {  var jobApplicationUrl = ;  //function return the JobApplicationUrl  this.CreateJobApplicationURl = function (JobId) {  jobApplicationUrl = jobURL(JobId);  // Alert to check the shared url.  //alert(jobApplicationUrl);  return jobApplicationUrl;  }  //function that creates dynamic url including tenant,source,user and job id.  function jobURL(JobId) {  var host = location.host;  var URL = ;  // Just a dummy url to make the it run on localhost.  if (host.indexOf(ams.hirepro.in) != -1||host.indexOf(db1.hirepro.in)!=-1) {  URL = getLiveUrl();  }  else {  URL = http://d.ams.hirepro.in/amserdemo/public/JobApplication/Default.aspx/?;  URL += getTenantUserAndJobIDEncryption();  }  //alert(URL);  return URL;  }  //function to get all the values for queryString.  var escapedURL = function () {  var alias = getTenantAdamInfo().TenantAlias;  var SourceId = getSourceId();  var UserId = readCookie(userId);  var EncrpytedJobId = $(#control_Use_It_For_Setting_Attributes).attr(RecentlyEncryptedJobId);  //alert to check the values  //return (alias%3D + alias + %25userid%3D + UserId + %25sourceid%3D + SourceId + %25jobid%3D + JobId);  return (alias= + alias + userid= + UserId + sourceid= + SourceId + jobid= + EncrpytedJobId);  }  // function to fect virtual path of that hosting dynamically.  var fetchVirtualDirectoryName = function () {  var arrayOfPathName = location.pathname.split(/);  return arrayOfPathName[1];  }  // function to get encrypted source id from the hidden field.  var getSourceId = function () {  return $(# + GetClientId(hfEncryptedSourceId)).val();  }  // function to escape the url but presently not used.  var getTenantUserAndJobIDEncryption = function () {  var URL = escapedURL();  //return escape(URL);  return URL;  }  // function to get the live url dynamically.  var getLiveUrl = function () {  var protocol = location.protocol;  var hostName = location.hostname;  var host = location.host;  var liveURL = ;  liveURL += protocol + // + host + /;  liveURL += (host.indexOf(:) == -1) ? fetchVirtualDirectoryName() : ;  liveURL += /public/JobApplication/?;  liveURL += getTenantUserAndJobIDEncryption();  return liveURL;  }  }  HTML code for Share job Modal window      Email    Direct  Hi,  I would like to announce a new job opening in our organization. A complete job description  is available on the link provided below. Eligible individuals interested in applying  for this position may submit an application on the link below    Social Media    style=border-style: none; border-color: inherit; border-width: medium;  overflow: hidden; scrolling=no>    frameborder=0 style=border-style: none; height: 350px; width: 100%; border-color: inherit;  border-width: medium; overflow: hidden;>    
Subscribe to:
Post Comments (Atom)
 
 
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.