Re: [jQuery] Extracting content from a div?
I'm suspecting youdo an ajax call, you get a page, but only need a
part of it injected into your own.
There might be a better solution, but this should work.
data = '...<div class="error"><ul><li>Gast Email der Rezension kann
nicht den Wert 'undefined'>speichern.</li></ul></div>...';
data = data.substring(data.indexOf('<div class="error">'));
data = data.substring(0,data.indexOf('</div>')+6);
On Sat, Jan 9, 2010 at 1:49 PM, youradds <andy.newby@gmail.com> wrote:
>
> Hi,
>
> I need to try and extract the following from a STRING (not the current
> page);
>
> <div class="error">
> <ul>
> <li>Gast Email der Rezension kann nicht den Wert 'undefined'
> speichern.</li>
> </ul>
> </div>
>
> How would I do this? I had a look on google, but all they seem to be
> talking about is extracting from the current page, which I don't want :
> (
>
> TIA!
>
> Andy
--
Andrei Eftimie
http://eftimie.com
+40 758 833 281
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home