Hi,

Thanks for the reply. I tested that code, and it works - the problem
is, there are newlines etc in the page too - how would I go about
that?

Also, all I really need is the erorr message ...i.e:

Gast Email der Rezension kann nicht den Wert 'undefined'

How would I go about this?

TIA!

Andy

On Jan 10, 7:39 am, Andrei Eftimie <k3liu...@gmail.com> wrote:
> 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.ne...@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 Eftimiehttp://eftimie.com
> +40 758 833 281
>
> Puncthttp://designpunct.ro

Reply via email to