This depends. How are you linking the documents?
You could pass a variable in the url to the next page and use the location.search property to get the variable.
acoder, thanks for your response.
Basically, this is what I intend to do:
Report1.htm
<html>
<head>
<script language = javascript>
var ReportName = 'MaturityReport.htm';
</script>
</head>
</html>
Now, in ShowHistory.htm, I want to pick up the value of the variable, ReportName (which is declared in Report1.htm)
ShowHistory.htm
<html>
<head>
</head>
<body>
document.write("<a target="+"ReportWindow"+" href='"+ReportName+"'>Show Report</a>");
</body>
</html>
The reason I want to pass the ReportName to ShowHistory.htm is because, there will many .htm files like Report1.htm, Report2.htm etc. and each will have a different value for the ReportName variable.
So, I want to create a generic ShowHistory.htm which picks up the ReportName from those .htm files (i.e .Report1.htm, Report2.htm etc.)
Any idea acoder?
Thanks a lot.