Hey guys love this script!!!!! i notices a bug though, it works perfectly in IE and Firefox however in Firefox (and only firefox as far as i can tell) if you click on one of the images (up arrow or down arrow) the javascript console pops up and gives this error:
Error: cross_obj has no properties
Source File: http://www.fiveforksmarket.com/pages/home.php
Line: 82
this site is curently under development and i cannot afford to stop. however the above link will be active however the line number could change so i am providing the code:
LOOK FOR MY NOTE IN ALL CAPS TO INDICATE WHERE THERE ERROR LIES
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>Five Forks Market</title>
<STYLE>
body { scrollbar-base-color:#F9E915; }
/*body { scrollbar-face-color: #f9e915; scrollbar-highlight-color: #ce670b; scrollbar-3dlight-color: #ce670b; scrollbar-shadow-color: #F9E915; scrollbar-darkshadow-color: #F9E915; scrollbar-track-color: #ce670b; scrollbar-arrow-color: #ce670b; }*/
/*body { scrollbar-face-color: #ce670b; scrollbar-highlight-color: #F9E915; scrollbar-3dlight-color: #ce670b; scrollbar-shadow-color: #F9E915; scrollbar-darkshadow-color: #ce670b; scrollbar-track-color: #ce670b; scrollbar-arrow-color: #F9E915; }*/
</STYLE>
<SCRIPT LANGUAGE='JavaScript'>
<!--
if (top == window)
location.href = '../index.php?page=about'
-->
</SCRIPT>
</head>
<body bgcolor="#ce670b" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">
<div id="staticbuttons" style="position:absolute;">
<a href="javascript:" onmouseover="myspeed=-thespeed" onmouseout="myspeed=0"><img
src="arrows_up.gif" border="0"></a>
<a href="javascript:" onmouseover="myspeed=thespeed" onmouseout="myspeed=0"><img
src="arrows_dn.gif" border="0"></a>
</div>
<script>
//Page Scroller (aka custom scrollbar)- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
var Hoffset=25 //Was 70Enter buttons' offset from right edge of window (adjust depending on images width)
var Voffset=88 //Was 80 Enter buttons' offset from bottom edge of window (adjust depending on images height)
var thespeed=3 //Enter scroll speed in integer (Advised: 1-3)
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
var myspeed=0
var ieHoffset_extra=document.all? 15 : 0
var cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById("staticbuttons") : document.staticbuttons
function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
***THE FOLLOWING LINE IS WHERE THE ERROR IS OCCURING***
function positionit(){
var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight
if (document.all||document.getElementById){
cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px"
}
else if (document.layers){
cross_obj.left=dsocleft+window_width-Hoffset
cross_obj.top=dsoctop+window_height-Voffset
}
}
function scrollwindow(){
window.scrollBy(0,myspeed)
}
function initializeIT(){
positionit()
if (myspeed!=0){
scrollwindow()
}
}
if (document.all||document.getElementById||document.layers)
setInterval("initializeIT()",20)
</script>
</body>
</html>



Reply With Quote


Bookmarks