CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Mar 2013
    Posts
    9

    Question Capturing AJAX on the Web Client

    Hi All,

    I’m capturing html as it download to a web client app. I programmatically click a checkbox and this triggers an ajax call to download additional none cache html. I want to use something like jQuery.ajax({ url: “redirected.html”, content: document.body});

    Or something like:
    String ajax = @"$('#cs-ZipCode').click(function(){
    alert('in jquery');
    $.ajax({
    url: 'ajaxJQuery',
    dataType: 'html',
    error: function(){
    alert('Error');
    },
    success: function(data){
    alert('SUCCESS');
    alert(data);
    }
    });";

    to process the ajax code. Can you suggest a code snippet?

    King
    Last edited by kwcoffee1; September 21st, 2013 at 05:34 PM.

  2. #2
    Join Date
    Jun 2009
    Posts
    113

    Re: Capturing AJAX on the Web Client

    If you just want to grab the Ajax content and use it in place of the current body, then use the shorthand Ajax method:
    Code:
    $('body').load('redirected.html');
    http://api.jquery.com/load/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured