Well, you should consider reading the doc sometimes :
http://docs.jquery.com/Core/jQuery#expressioncontext

> By default, if no context is specified, $() looks for DOM elements within
> the context of the current HTML document. If you do specify a context, such
> as a DOM element or jQuery object, the expression will be matched against
> the contents of that context.
>
$("div#update1").html($('div#update1', data));

And if you had read even a bit further you might have stubled on that :
http://docs.jquery.com/Ajax/load#urldatacallback
It allows you to do that :
$("div#update1").load("InteractionsByCompanyr6.aspx div#update1 > *", {
alpha: alpha });
$("div#update1") is who will recieve the contents in your existing page
"InteractionsByCompanyr6.aspx div#update1 > *" says you load (using get)
your asp page and just keep the contents of update1 to insert.
{ alpha: alpha } is the get parameter to happend the query
Ain't it nifty ?

Michel Belleville


2009/11/4 SECSteve <dde...@gmail.com>

> I have been able to get the .get method to work and put the results in
> a <div>.  My problem is that my .get calls ont he same page as it
> originates from so it returns the entire page inot the <div>.  I get
> the entire page with my new content inside the existing page.    How
> do I get just the new content for my <div>?
>
> Here is me code.
>
>  function updateCompanies(alpha){
>    $.get("InteractionsByCompanyr6.aspx?alpha=" + alpha
>      ,""
>      , function(data){
>          $("div#update1").html(data);
>        }
>    );
>  }
>
>
> Thanks,
> Steve
>

Reply via email to