var theString = '"../graphics/press/012.jpg" width=500 height=339';
var theWidth = parseInt(theStr ing.substr(theS tring.indexOf(' width=') + 6));
var theHeight = parseInt(theStr ing.substr(theS tring.indexOf(' height=') +
7));
<find clausen> wrote in message
news:43urrv4kum h0d6h8p9efv7vjd m3a54vteb@4ax.c om...[color=blue]
>
> How do i find the value next to width= (500)
> in:
>
> '"../graphics/press/012.jpg" width=500 height=339'
>
>
> --
>
> find clausen
> www.photopress.dk[/color]
Assuming that the number of digits in the width is not a certainty
(ie. could be 500 or 67 or 1005) then you can do it by splitting the
string on a space, looping the results to find the width, and
splitting the width on the equals sign. Just like this...
On 21 Nov 2003 12:17:08 -0800, noreply@gurupik a.com (jon) wrote:
[color=blue]
> Assuming that the number of digits in the width is not a certainty
> (ie. could be 500 or 67 or 1005) then you can do it by splitting the[/color]
Comment