javascript thread: string picking problem...
Depends on what you know is going to be consistent...
e.g.
if each path begins with "c:\winnt\profiles\administrator\desktop" and you
want to chop off that bit, all you have to do is
sPath = sPath.substring(39);
so that it takes a string from the 39th character to the end.
however, if the fisrt part is always different and you only want whatever
bit follows "\images" then you would need to find that and take the string
from there
sPath = sPath.substring(sPath.indexOf("\images"));
-----Original Message-----
From: Shahzad Khan [mailto:shahzad@i...]
Sent: 26 June 2001 07:10
To: javascript
Subject: [javascript] string picking problem...
Hi all
I got into a problem....the problem is I want to get a specific string from
a string.
e.g. the string is
c:\winnt\profiles\administrator\desktop\images\asdf.jpg
so how can I pick only \images\asdf.jpg and insert it in database...
thanx in advance....
sk