G
George
Dear All,
I am trying to write a simple script that prints out all the URLs in the
history of the current window. I wrote this code:
<html>
<head>
<title>Example Page</title>
<script text="javascript">
var intlen = history.length;
var i;
document.write("There are " + intlen + " windows in the history");
for (i = 0; i < intlen; i++){
var wina = history;
document.write(wina.document.URL);
document.write("<BR>");
}
</script>
</head>
<body>
<p>This is a test.</p>
</body>
</body>
</html>
However, when I run it I get the number of history items correctly as well
as an Access Refused to history.item message.
How can I avoid that? I remember reading somewhere that allowing this
would be a security risk - could someone please explain why?
I look forward to hearing from you soon.
Thanks in advance.
George
I am trying to write a simple script that prints out all the URLs in the
history of the current window. I wrote this code:
<html>
<head>
<title>Example Page</title>
<script text="javascript">
var intlen = history.length;
var i;
document.write("There are " + intlen + " windows in the history");
for (i = 0; i < intlen; i++){
var wina = history;
document.write(wina.document.URL);
document.write("<BR>");
}
</script>
</head>
<body>
<p>This is a test.</p>
</body>
</body>
</html>
However, when I run it I get the number of history items correctly as well
as an Access Refused to history.item message.
How can I avoid that? I remember reading somewhere that allowing this
would be a security risk - could someone please explain why?
I look forward to hearing from you soon.
Thanks in advance.
George