That is how HTML works. If you include an image tag or something else which needs "external" ressources to be rendered it will load them (or at least, try to load them :)). If you just want the text in the response you have to clean your response first (i.E. String.stripTags in the more package http://mootools.net/docs/more/Types/String.Extras#String:stripTags ) and then set it to your element.
Best, Steffen On Thursday, February 21, 2013 3:44:31 PM UTC+1, woomla wrote: > > If I create a new Element and set html, the html is parsed. This leads to > unwanted request (to embedded images i.e.). Is there a way to prevent this. > > My goal is to load example pages from different directories and display > the first paragraph of every example in a list. I obtain the html with > Request (not Request.html!). > > request = new Request({ > method: 'get', > noCache: true, > url: href + 'example.html', > onSuccess: function (responseText) > { > temp = new Element('div').set('html', responseText); > h1 = temp.getElement('h1').get('text'); > > The line 'temp = ...' triggers the parsing of responseText, but I don't > want it to load images i.e. > > Is this possible with mootools, I cannot find anything for that? > Or do I have to parse it myself? > > W. > > > > > -- --- You received this message because you are subscribed to the Google Groups "MooTools Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mootools-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.