• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

How to pick the physical path of the html file.

I have a file a.htm on desktop.When i click it it gets opened.How can i get the physical path
of a.htm
0
searchsanjaysharma
Asked:
searchsanjaysharma
  • 2
  • 2
1 Solution
 
plusone3055Commented:
right click and select properties  the phytical path is right there :)
0
 
plusone3055Commented:
right click and select properties  the phytical path is Loacation see attached photo
photo.JPG
0
 
leakim971PluritechnicianCommented:
try :

location.href to get the full path
or :
location.pathname
or :
location.href.split("/").slice(0,-1).join("/")
0
 
leakim971PluritechnicianCommented:
test :
<html><head>
<script>
var path = location.href.split("/").slice(0,-1).join("/");
alert(path);
</script>
</head><body></body></html>

Open in new window

0
 
searchsanjaysharmaAuthor Commented:
ok
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now