C
Cloy
The page I'm having problems with is http://www.pontonline.org/index-
new3.htm
Here's the problem...
A script in the page loads a "calendar" (actually a list of dates)
into an iframe at the right side of the page and then scrolls the list
to today's date. The script is listed below.
Everything works fine except that after the page loads, the main page
(not just the iframe) "jumps" down also -- I assume the anchor link is
causing this.
Any suggestions on a workaround for this? Is there a command I could
use to ensure that only the iframe goes to the named anchor? ...or
even something that will move the main page back to the top?
Thanks, in advance, for your help -Cloy
<script type="text/javascript">
<!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var year = date.getFullYear();
document.write('<iframe name="News" width="280" marginwidth="0"
height="280" frameborder="0" marginheight="0" align="left"
scrolling="auto" hspace="0" vspace="0" src="office/calendar-
items.htm#' + month + day + year + '">');
document.write('Your browser does not support inline frames or is
currently configured not to display inline frames.')
document.write('</iframe>')
// -->
</script>
new3.htm
Here's the problem...
A script in the page loads a "calendar" (actually a list of dates)
into an iframe at the right side of the page and then scrolls the list
to today's date. The script is listed below.
Everything works fine except that after the page loads, the main page
(not just the iframe) "jumps" down also -- I assume the anchor link is
causing this.
Any suggestions on a workaround for this? Is there a command I could
use to ensure that only the iframe goes to the named anchor? ...or
even something that will move the main page back to the top?
Thanks, in advance, for your help -Cloy
<script type="text/javascript">
<!--
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var year = date.getFullYear();
document.write('<iframe name="News" width="280" marginwidth="0"
height="280" frameborder="0" marginheight="0" align="left"
scrolling="auto" hspace="0" vspace="0" src="office/calendar-
items.htm#' + month + day + year + '">');
document.write('Your browser does not support inline frames or is
currently configured not to display inline frames.')
document.write('</iframe>')
// -->
</script>