On Apr 20, 3:28 pm, Sephi-Chan <[EMAIL PROTECTED]> wrote:
> Hello,
>
> You can look the code of the load function in the jQuery source. It's what i
> did few days ago whereas i want do this (filter the response).
>
> I make something like this :
>
> $.ajax({
>         url : 'remotePage.php',
>         dataType : 'html',
>         complete : function(response){
>
>                 var filteredResponse = jQuery("<div />").append(
>                         response.responseText.replace(
>                                 /<script(.|\s)*?\/script>/g,
>                                 ""
>                         )
>                 ).find('div#ajax');
>
>                 $('div#ajaxContent').append((html));            
>         }
>
> });
>
> This script take only the text which is in the div#ajax bloc in the remote
> page. Then this content is put in the div#ajaxContent of the calling page.
>
> Sephi-Chan
> --


For some reason this is not working for me.  Is this script correct?

Also, it seems that the jquery load function is so nice and clean, is
there no way to do something similar when using the ajax get?

Reply via email to