"§Þ¦w" wrote:
How can i get the present filename (the opened html) and print it in the
html (this html)?
thx
var protocol = window.location.protocol;
var path = window.location.pathname;
// this is required because IE loading files locally uses "\" and not "/"
var separator = (protocol == "file:" && path.indexOf("/", 1) == -1 ? "\\" :
"/");
var path = window.location.pathname;
var file = path.substring(path.lastIndexOf(separator) + 1);
document.write(file);
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-deve...upgrade_2.html