nfdevil

Untitled

Dec 17th, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.86 KB | None | 0 0
  1. JS in view:
  2. -----------
  3.           jQuery.ajax({
  4.                 type: "POST",
  5.                 url: "<?php echo Yii::app()->createUrl('site/fetchurlmetadata') ?>",
  6.                 data: {
  7.                                                                                 url: url,
  8.                                                                                 <?php echo Yii::app()->request->csrfTokenName;?>: '<?php echo Yii::app()->request->csrfToken; ?>'
  9.                                                                 },
  10.                 dataType: 'application/json',
  11.                 success: function(response)
  12.                 {
  13.                     $('.images img').hide();
  14.                     $('.load').hide();
  15.                     $('img#1').fadeIn();
  16.                     $('#cur_image').val(1);
  17.                     $('#list_item_title').html(response.title);
  18.                     $('#list_item_url').html(response.url);
  19.                     $('#list_item_description').html(response.description);
  20.                     //$('#list_item_tags').html($('#span_image .tags').val());
  21.                 }              
  22.             });
  23.  
  24. JS generated (source of page):
  25. -------------------------------
  26.  $('.load').html(loading_image).show();
  27.             jQuery.ajax({
  28.                 type: "POST",
  29.                 url: "/yiiclean/site/fetchurlmetadata",
  30.                 data: {
  31.             url: url,
  32.             YII_CSRF_TOKEN: '34f5dc770f32ff19fa165e6ce045010d33c67b03'
  33.         },
  34.                 dataType: 'application/json',
  35.                 success: function(response)
  36.                 {
  37.                     $('.images img').hide();
  38.                     $('.load').hide();
  39.                     $('img#1').fadeIn();
  40.                     $('#cur_image').val(1);
  41.                     $('#list_item_title').html(response.title);
  42.                     $('#list_item_url').html(response.url);
  43.                     $('#list_item_description').html(response.description);
  44.                     //$('#list_item_tags').html($('#span_image .tags').val());
  45.                 }              
  46.             });
Advertisement
Add Comment
Please, Sign In to add comment