SHARE
TWEET

Javascript

a guest Mar 5th, 2010 655 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.         $ts = time();
  3.         $token = generate_action_token($ts);
  4. ?>
  5. <script>
  6. $(document).ready(function() {
  7.         sendData();
  8. }
  9. function sendData()
  10. {
  11.         $.getJSON('<?php echo $vars['url']?>action/v-share/test', { 'var':'foo', '__elgg_ts':'<?php echo $ts;?>','__elgg_token':'<?php echo $token;?>' }, checkData);
  12. }
  13. function checkData(data)
  14. {
  15.         alert(data.responsevar);
  16. }
  17. </script>
  18. <div id="vardata"></div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top