Re: [jQuery] possible to load html page fragment?

2006-11-18 Thread Yehuda Katz
Are you trying to skip layout elements on a page? jQuery automatically sends a header indicating that it's an XHR, so you can use your server-side programming to skip layout elements on XHR. In Rails, it's as easy as doing a render with :layout => false if request.xhr? -- Yehuda On 11/17/06, Kar

Re: [jQuery] possible to load html page fragment?

2006-11-18 Thread Klaus Hartl
Philippe Jadin schrieb: >> Thanks to both of you! I'll give your suggestions a shot this >> weekend. And if I'm feeling really adventurous, maybe I'll try to add >> a parameter for this in the jTip plugin. > > This gives me an idea : this could be used for very simple > jquery-based progressive en

Re: [jQuery] possible to load html page fragment?

2006-11-18 Thread Philippe Jadin
> Thanks to both of you! I'll give your suggestions a shot this > weekend. And if I'm feeling really adventurous, maybe I'll try to add > a parameter for this in the jTip plugin. This gives me an idea : this could be used for very simple jquery-based progressive enhancement (unobstrusive ajax) :

Re: [jQuery] possible to load html page fragment?

2006-11-17 Thread Karl Swedberg
Matt and Paul, Thanks to both of you! I'll give your suggestions a shot this weekend. And if I'm feeling really adventurous, maybe I'll try to add a parameter for this in the jTip plugin. Karl ___ Karl Swedberg www.englishrules.com www.learningjquery.com On Nov 17, 2006, at 4

Re: [jQuery] possible to load html page fragment?

2006-11-17 Thread Paul McLanahan
Indeed :) Didn't see your message before I hit send. They should both work. On 11/17/06, Matt Stith <[EMAIL PROTECTED]> wrote: > Or my way, its a little easier to read. > > > On 11/17/06, Paul McLanahan <[EMAIL PROTECTED]> wrote: > > > > You would have to use $.ajax so that you can process the ret

Re: [jQuery] possible to load html page fragment?

2006-11-17 Thread Matt Stith
Or my way, its a little easier to read. On 11/17/06, Paul McLanahan <[EMAIL PROTECTED]> wrote: You would have to use $.ajax so that you can process the returned data yourself. Once you got the returned document you could use that document as the context for a jQuery statement. $.ajax({url:'my

Re: [jQuery] possible to load html page fragment?

2006-11-17 Thread Paul McLanahan
You would have to use $.ajax so that you can process the returned data yourself. Once you got the returned document you could use that document as the context for a jQuery statement. $.ajax({url:'myfile.html',success:function(data){ $('#loadme',data).appendTo(document.body); }}); That is ver

Re: [jQuery] possible to load html page fragment?

2006-11-17 Thread Matt Stith
I would do it like this: $.get('file.php',function(reponse) { $('someElement').html($('#loadme',response).html() || '')' }); Easy peasy. ;) On 11/17/06, Karl Swedberg <[EMAIL PROTECTED]> wrote: Hi everyone! Someone asked me the other day if the jTip plugin, which uses .load() for "AHAH," coul

[jQuery] possible to load html page fragment?

2006-11-17 Thread Karl Swedberg
Hi everyone! Someone asked me the other day if the jTip plugin, which uses .load() for "AHAH," could load only a fragment of a page, for example only what's inside . Sadly, but not surprisingly, I didn't know the answer. I mean, I know that jTip can't do it as is. But the larger questio