Advertisement
martyychang

Home Page Component: AJAX Toolkit 29.0

Feb 17th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.43 KB | None | 0 0
  1. <!-- Include AJAX Toolkit 29.0 -->
  2. <script src="/soap/ajax/29.0/connection.js"></script>
  3.  
  4. <!-- Set the Ajax client's session ID -->
  5. <script type="text/javascript">
  6.  
  7.     // Get the session ID from the "sid" cookie
  8.  
  9.     var sidRegExp = /sid=([^;]+);/;
  10.     var sidMatches = sidRegExp.exec(document.cookie);
  11.     var sid = sidMatches[1];
  12.  
  13.     // Set the session ID for the Ajax client
  14.  
  15.     sforce.connection.sessionId = sid;
  16. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement