tomhoppe.com

Racing, Web Development, Photography, and Beer...Stuff that matters.

Monday, February 11, 2008

Grab filename from window location

Here is a snippet I use to grab the filename from the full window location of page.

var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1,
location.pathname.length);

Labels: ,

0 Comments:

Post a Comment

<< Home