Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JS in view:
- -----------
- jQuery.ajax({
- type: "POST",
- url: "<?php echo Yii::app()->createUrl('site/fetchurlmetadata') ?>",
- data: {
- url: url,
- <?php echo Yii::app()->request->csrfTokenName;?>: '<?php echo Yii::app()->request->csrfToken; ?>'
- },
- dataType: 'application/json',
- success: function(response)
- {
- $('.images img').hide();
- $('.load').hide();
- $('img#1').fadeIn();
- $('#cur_image').val(1);
- $('#list_item_title').html(response.title);
- $('#list_item_url').html(response.url);
- $('#list_item_description').html(response.description);
- //$('#list_item_tags').html($('#span_image .tags').val());
- }
- });
- JS generated (source of page):
- -------------------------------
- $('.load').html(loading_image).show();
- jQuery.ajax({
- type: "POST",
- url: "/yiiclean/site/fetchurlmetadata",
- data: {
- url: url,
- YII_CSRF_TOKEN: '34f5dc770f32ff19fa165e6ce045010d33c67b03'
- },
- dataType: 'application/json',
- success: function(response)
- {
- $('.images img').hide();
- $('.load').hide();
- $('img#1').fadeIn();
- $('#cur_image').val(1);
- $('#list_item_title').html(response.title);
- $('#list_item_url').html(response.url);
- $('#list_item_description').html(response.description);
- //$('#list_item_tags').html($('#span_image .tags').val());
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment