Forum Moderators: open
I would love to change the code to be generic so that the base page name (i.e. "0104shesaid" for 0104shesaid.html) gets echoed onto the page as it's created.
Does any one have any code snippets or sample pointers on how to do this?
Many thanks!
Marianne
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
</head>
<body>
<script type="text/javascript">
var loc_var=window.location.href;
alert(loc_var);
var loc_var2=loc_var.split('.');
var lv_ln=loc_var2.length;
var loc_var3=loc_var2[lv_ln-2];
var loc_var4=loc_var3.split('/');
lv_ln=loc_var4.length;
alert(loc_var4[lv_ln-1]);
</script>
</body>
</html>