Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: getting filename of current loaded page


Message #1 by kristof@b... on Fri, 5 Jul 2002 14:03:54
is there a short work around to get only the filename, without extension, 
of the current loaded page ?

thx !
k.
Message #2 by Greg Griffiths <greg.griffiths@g...> on Sun, 07 Jul 2002 15:45:29 +0100
check out :

http://www.codeave.com/javascript/code.asp?u_log=7020

At 14:03 05/07/02 +0000, you wrote:
>is there a short work around to get only the filename, without extension,
>of the current loaded page ?
>
>thx !
>k.
>
>---
>
>Improve your web design skills with these new books from Glasshaus.
>
>Usable Web Menus
>http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
>r-20
>Constructing Accessible Web Sites
>http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
>r-20
>Practical JavaScript for the Usable Web
>http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
>r-20


Message #3 by "Larry Woods" <larry@l...> on Sun, 7 Jul 2002 09:27:58 -0700
Here you go....  Copy and try it out.

Larry Woods

=========================
<html>
<!-- This assumes a format of 'blahblah/filename.ext'
	'filename' contains A-z, 0-9, or '_'
-->
<title>lwoods.com</title>
<body>
<script language="JavaScript">
<!--
var re=/^(.*)\/([0-9,A-z,_]*)\.([A-z]*)$/
var t=re.exec(location.href);
var filName=t[2];
document.write("<br>Filename=" + filName + "<br>");
// -->
</script>
</body>
</html>

========================


> -----Original Message-----
> From: kristof@b... [mailto:kristof@b...]
> Sent: Friday, July 05, 2002 2:04 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] getting filename of current
> loaded page
>
>
> is there a short work around to get only the filename,
> without extension,
> of the current loaded page ?
>
> thx !
> k.
>
> ---
>
> Improve your web design skills with these new books
> from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=n
> osim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=n
osim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/thepr
ogramme
r-20

Message #4 by kristof@b... on Mon, 8 Jul 2002 17:25:04
and how to do so in VbScript ?
Message #5 by "Larry Woods" <larry@l...> on Mon, 8 Jul 2002 09:39:39 -0700
I sent this out once.....
==========================
Here you go....  Copy and try it out.

Larry Woods

=========================
<html>
<!-- This assumes a format of 'blahblah/filename.ext'
	'filename' contains A-z, 0-9, or '_'
-->
<title>lwoods.com</title>
<body>
<script language="JavaScript">
<!--
var re=/^(.*)\/([0-9,A-z,_]*)\.([A-z]*)$/
var t=re.exec(location.href);
var filName=t[2];
document.write("<br>Filename=" + filName + "<br>");
// -->
</script>
</body>
</html>

========================



> -----Original Message-----
> From: kristof@b... [mailto:kristof@b...]
> Sent: Monday, July 08, 2002 5:25 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] RE: getting filename of
> current loaded page
>
>
> and how to do so in VbScript ?
>
> ---
>
> Improve your web design skills with these new books
> from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=n
> osim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=n
> osim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=n
osim/theprogramme
r-20

Message #6 by kristof@b... on Tue, 9 Jul 2002 09:16:40
I suppose this is Javascript and not VBscript, isn't it ?!


<script language="JavaScript">
<!--
var re=/^(.*)\/([0-9,A-z,_]*)\.([A-z]*)$/
var t=re.exec(location.href);
var filName=t[2];
document.write("<br>Filename=" + filName + "<br>");
// -->
</script>

  Return to Index