[jQuery] Re: Can I get the contents from respose by ajax

2009-01-13 Thread David .Wu
never mind, it's really work now, filter is great, thanks. On 1月13日, 下午7時19分, "David .Wu" wrote: > nope, it's doesn't work, I type the wrong character but something > interesting happened > > $('#response').html($(res).filter('#a').text()); <- it's not work > $('#response').html($(res).filter('

[jQuery] Re: Can I get the contents from respose by ajax

2009-01-13 Thread David .Wu
nope, it's doesn't work, I type the wrong character but something interesting happened $('#response').html($(res).filter('#a').text()); <- it's not work $('#response').html($(res).filter('$a').text()); <- it's give me 123, but not truly work, $('#response').html($(res).text()); <- it's not wor

[jQuery] Re: Can I get the contents from respose by ajax

2009-01-13 Thread David .Wu
it's work, thanks On 1月12日, 下午5時03分, Balazs Endresz wrote: > Use filter with $.ajax: > $('#response').html($(res).filter('#a').text()); > > On Jan 12, 9:30 am, "David .Wu" wrote: > > > And I found the load is not work either, because it still get the > > construct not the value > > for example

[jQuery] Re: Can I get the contents from respose by ajax

2009-01-12 Thread Balazs Endresz
Use filter with $.ajax: $('#response').html($(res).filter('#a').text()); On Jan 12, 9:30 am, "David .Wu" wrote: > And I found the load is not work either, because it still get the > construct not the value > for example > > > > $(document).ready(function) > { > $('#test').load('ajax.php

[jQuery] Re: Can I get the contents from respose by ajax

2009-01-12 Thread David .Wu
And I found the load is not work either, because it still get the construct not the value for example $(document).ready(function) { $('#test').load('ajax.php #a'); }); and the result was 123, what I exactly want is 123 On 1月11日, 下午8時13分, Balazs Endresz wrote: > As jQuery parses this

[jQuery] Re: Can I get the contents from respose by ajax

2009-01-11 Thread Balazs Endresz
As jQuery parses this html the output will contain three elements: title, meta, and the div instead of the single html. So .find() won't work because it will search in the descendant elements, but filter will return '#a' because it's an element of the current jQuery object. $('') doesn't work eit

[jQuery] Re: Can I get the contents from respose by ajax

2009-01-11 Thread David .Wu
I tried all your suggestion, but got some weired result. ajax.html http://www.w3.org/1999/xhtml";> ajax