Re: [jQuery] xml in Browser after ajax

2006-11-05 Thread Olaf Bosch
Stephen Woodbridge schrieb: I wanted to show it only visuel. Understand, in the DIV#content is to see: ?xml version=1.0 encoding=UTF-8? blatext/bla So the pure code, does a possibility exist there? Ooh! I know! Did this! look at: http://imaptools.com:8081/maps/demo2.html Boah, great!!!

Re: [jQuery] xml in Browser after ajax

2006-11-04 Thread Klaus Hartl
[EMAIL PROTECTED] schrieb: Like this: $('#el1').empty().append($(#for-el1, xml)); I guess. If thats it then wow I'm really impressed by the expressive power of jQuery :) Jacob, in that case you can simply use html(): $('#el1').html( $(#for-el1, xml) ); -- Klaus

Re: [jQuery] xml in Browser after ajax

2006-11-04 Thread Jörn Zaefferer
Olaf Bosch schrieb: How I can let the grabbeing xml in browser explain? With the .html give me *[object XMLDocument]* The Function are: $.ajax({ type: GET, url: url.xml, dataType: xml, success: function(msg){ $(#content).html(msg); } });

Re: [jQuery] xml in Browser after ajax

2006-11-04 Thread Olaf Bosch
Jörn Zaefferer schrieb: How I can let the grabbeing xml in browser explain? With the .html give me *[object XMLDocument]* If you need html, tell $.ajax to get it for you: $.ajax({ ... dataType: html, sucess: function(html) { $('#content').html(html); } });

Re: [jQuery] xml in Browser after ajax

2006-11-04 Thread Stephen Woodbridge
Olaf Bosch wrote: Jörn Zaefferer schrieb: How I can let the grabbeing xml in browser explain? With the .html give me *[object XMLDocument]* If you need html, tell $.ajax to get it for you: $.ajax({ ... dataType: html, sucess: function(html) {

Re: [jQuery] xml in Browser after ajax

2006-11-04 Thread Ⓙⓐⓚⓔ
Damn nice tool! On 11/4/06, Stephen Woodbridge [EMAIL PROTECTED] wrote: Ooh! I know! Did this! look at: http://imaptools.com:8081/maps/demo2.html double click the map to get xml displayed under the map, click toggle to see it as formated html. Check my script, you welcome to any ideas I

[jQuery] xml in Browser after ajax

2006-11-03 Thread Olaf Bosch
How I can let the grabbeing xml in browser explain? With the .html give me *[object XMLDocument]* The Function are: $.ajax({ type: GET, url: url.xml, dataType: xml, success: function(msg){ $(#content).html(msg); } }); -- Viele Grüße, Olaf

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
Success's parameter on an xml ajax call is not a string. it's a fully parsed out representation of the xml. Normally people call the parameter 'xml' not 'msg'. You deal with it differently... if you get pieces of the xml with standard jquery notation (plus you pass the xml, as in:

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
yeah... but what's the point? debugging? some folks (not me) use html without trying to deal with it as xml, and just use some regexs and other methods to insert directly into the current dom (page) the beauty of the full ajax deal is to take what you need from the xml and slip it just where you

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
OK here's the point: suppose I want to return in one ajax call several values to be displayed in different dom elements. I'd return an XML value with for-el1.../for-el1for-el2.../for-el2 and so on. Then I'll use $(for-el1, xml) and so on to get each piece and stick it into the corresponding

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Stephen Woodbridge
I barely know this stuff, but would something like this work: $(#el1).html($(for-el1, xml).text()); $(#el2).html($(for-el2, xml).text()); $(#el3).html($(for-el3, xml).text()); or if you have a lot of elements, then making an array of them and looping through the list might be cleaner. It

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
I'd say the code would be like $(#for-el1,xml).appendTo(#el1); On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK here's the point: suppose I want to return in one ajax call several values to be displayed in different dom elements. I'd return an XML value with

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
That works for text, not HTML, right? Because the HTML would get parsed out. Consider a return value of for-el1tabletr.../tr/table/for-el1 Etc. --Jacob I barely know this stuff, but would something like this work: $(#el1).html($(for-el1, xml).text()); $(#el2).html($(for-el2, xml).text());

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
Thats' 99% of the solution, I hope. But... appendTo replaces or adds? I want to *remove* the old contents. --Jacob I'd say the code would be like $(#for-el1,xml).appendTo(#el1); On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: OK here's the point: suppose I want to return in one ajax

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
switch it around using append do an empty before it! On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thats' 99% of the solution, I hope. But... appendTo replaces or adds? I want to *remove* the old contents. --Jacob I'd say the code would be like $(#for-el1,xml).appendTo(#el1);

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
Like this: $('#el1').empty().append($(#for-el1, xml)); I guess. If thats it then wow I'm really impressed by the expressive power of jQuery :) --Jacob switch it around using append do an empty before it! On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thats' 99% of the solution, I

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
jquery rocks! and http://visualjquery.com is my main reference! your quotes are a bit off... but mine are too sometimes! On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Like this: $('#el1').empty().append($(#for-el1, xml)); I guess. If thats it then wow I'm really impressed by the

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
Yep, I forgot a close- :) Actually it sounds like I want to use xJS, http://www.malsup.com/jquery/jxs/ dunno if everyone knows about it here, its a plugin that parses XML and sends the DOM elements to their right destination. --Jacob jquery rocks! and http://visualjquery.com is my main

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
Dang I should just go to sleep, I'm off my quotes myself :) The correct URL is http://www.brainknot.com/code/jxs.htm Took me a while to figger out what he was on about. --Jacob jquery rocks! and http://visualjquery.com is my main reference! your quotes are a bit off... but mine are too

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
from first glance, xsj looks like a pretty specially formattted xml. a little xslish. a good solution if you want the xml to have the rules instead of just data. On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yep, I forgot a close- :) Actually it sounds like I want to use xJS,

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread jyl
No, its a full page modification language. Pretty much all the effects and dom methods of jQuery are supported. Its great if you want to let the server drive whats shown on the page, like xajax (http://www.xajaxproject.org/) except explicitly. In fact I know now how to make xajax work with jquery,

Re: [jQuery] xml in Browser after ajax

2006-11-03 Thread Ⓙⓐⓚⓔ
that's what I meant... 1 file for the js html 1 for the xml xjs script and 1 for the xml data. the xjs does the rules instead of doing it directly in jq. sure looks like a lot of code to choose from! keep us all posted! On 11/3/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: No, its a full