Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.get(
- '/myviewpage',
- {myfield=14},
- function(data){ $('#SomeOtherDiv').html(data) }
- );
- function getInfo(args) {
- $.ajax({
- url: '/views/ajax',
- type: 'post',
- data: {
- view_name: 'your_view_name',
- view_display_id: 'block_1', //your display id
- view_args: args,
- },
- dataType: 'json',
- success: function (response) {
- if (response[1] !== undefined) {
- var viewHtml = response[1].data;
- $('#myDiv').html(viewHtml);
- Drupal.attachBehaviors(); //check if you need this.
- }
- }
- });
- }
Add Comment
Please, Sign In to add comment