Re: how to trim file path from filename
- From: "Evertjan." <exjxw.hannivoort@xxxxxxxxxxxx>
- Date: 31 Mar 2008 21:08:33 GMT
Bart Van der Donck wrote on 31 mrt 2008 in comp.lang.javascript:
Tom Cole wrote:
I would still recommend using server side code rather than javascript
on the client for making this split. The package reference by Erwin
Moller above would be how I would probably proceed with something like
this.
Me too. And it is a somewhat uncommon task for (client-side)
javascript. Normally a server program would parse this kind of data.
Indeed, but that can be done using serverside javascript
as requested and on topic:
<% // javascript
var url = 'http://aa.xx/bb/cc/dd.html';
var temp = url.split('/');
var file = temp.pop();
temp.push('');
var path = temp.join('/');
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.
- References:
- how to trim file path from filename
- From: andyau
- Re: how to trim file path from filename
- From: Bart Van der Donck
- Re: how to trim file path from filename
- From: Tom Cole
- Re: how to trim file path from filename
- From: Henry
- Re: how to trim file path from filename
- From: Tom Cole
- Re: how to trim file path from filename
- From: Bart Van der Donck
- how to trim file path from filename
- Prev by Date: XmlHttpRequest.onreadystatechange <-> this-keyword
- Previous by thread: Re: how to trim file path from filename
- Next by thread: Re: how to trim file path from filename
- Index(es):
Relevant Pages
|