Guest User

Untitled

a guest
Oct 1st, 2010
166
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--- proxy.cfm --->
  2. <cfsetting showdebugoutput="false" />
  3. <cfparam name="url.link" default="" />
  4. <cfhttp url="#url.link#" result="r" />
  5. <cfoutput>#serializeJSON(r)#</cfoutput>
  6.  
  7. <!--- test.cfm --->
  8.  
  9. <html>
  10. <head>
  11. <title></title>
  12.  
  13. <script src="jquery-1.4.2.min.js"></script>
  14. <script>
  15.     var fbLink = "http://www.facebook.com/plugins/like.php?href=<?php echo "http://" . $_SERVER['HTTP_HOST']  . $_SERVER['REQUEST_URI']; ?>%2F&layout=standard&show_faces=false&width=500&action=like&font=lucida+grande&colorscheme=light";
  16.     $(document).ready(function(){
  17.         $.ajax({
  18.             url: 'proxy.cfm?link=' + fbLink,
  19.             dataType: 'html',
  20.             success: function(data){
  21.                 var d = JSON.parse(data);
  22.                 console.log(d);
  23.                 console.log(d.Statuscode.indexOf('200'));
  24.                 if(d.Statuscode.indexOf('200') != -1){
  25.                     console.log(d.Filecontent);
  26.                     $('#myDiv').html(d.Filecontent);
  27.                 }
  28.                 else{
  29.                     alert('error!');
  30.                 }
  31.             }
  32.         });
  33.     });
  34.    
  35. </script>
  36.  
  37. </head>
  38. <body>
  39.     <p>hi</p>
  40.     <div id="myDiv" width="400" height="400"></div>
  41.     <p>done</p>
  42. </body>
  43. </html>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×