scroll verticale layer non funzionante con firefox

zzz

Nuovo Utente
8 Lug 2005
1
0
0
ciao a tutti!io dovrei realizzare una pagina in cui una sezione con dentro del testo scrolli in verticale al passaggio su 2 immagini up e down. ho trovato in giro il codice seguente che funziona correttamente con opera e ie ma il testo proprio non vuole saperne di scrollare con firefox.
ho provato a togliere il doctype e in questo modo anche su firefox funziona, ma ovviamente così la validazione è impensabile.
non è che qualcuno sa come risolvere il problema o mi sa indicare qualche altro script???è importante!!!!!!!!!!!!!!
grazie a tutti!!!

<?xml version="1.0"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="it">
<HEAD><TITLE>dHTML AP Scrollable Area Customised Demo with Images in the Content</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<STYLE type=text/css>#divUpControl {
HEIGHT: 30px; LEFT: 10px; POSITION: absolute; TEXT-ALIGN: right; TOP: 10px; WIDTH: 320px; Z-INDEX: 1
}
#divDownControl {
HEIGHT: 30px; LEFT: 10px; POSITION: absolute; TEXT-ALIGN: right; TOP: 270px; WIDTH: 320px; Z-INDEX: 1
}
#divContainer {
CLIP: rect(0px 320px 240px 0px); HEIGHT: 240px; LEFT: 10px; OVERFLOW: hidden; POSITION: absolute; TOP: 30px; VISIBILITY: hidden; WIDTH: 320px
}
#divContent {
LEFT: 0px; POSITION: absolute; TOP: 0px
}
H1 {
FONT: bold 11px Tahoma, Arial, Helvetica, sans-serif
}
BODY {
FONT: 11px Tahoma, Arial, Helvetica, sans-serif
}
P {
FONT: 11px Tahoma, Arial, Helvetica, sans-serif
}
A {
COLOR: #009999; FONT: 11px Tahoma, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
A:hover {
COLOR: #009999; FONT: 11px Tahoma, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline
}
</STYLE>


<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

<SCRIPT language=JavaScript>
<!--




// begin absolutely positioned scrollable area object scripts
function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new verifyCompatibleBrowser()


var speed=50

var loop, timer

function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}
function MoveArea(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}

function MoveAreaDown(move){
if(this.y>-this.scrollHeight+objContainer.clipHeight){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".down("+move+")",speed)
}
}
function MoveAreaUp(move){
if(this.y<0){
this.MoveArea(0,this.y-move)
if(loop) setTimeout(this.obj+".up("+move+")",speed)
}
}

function PerformScroll(speed){
if(initialised){
loop=true;
if(speed>0) objScroller.down(speed)
else objScroller.up(speed)
}
}

function CeaseScroll(){
loop=false
if(timer) clearTimeout(timer)
}
var initialised;
function InitialiseScrollableArea(){
objContainer=new ConstructObject('divContainer')
objScroller=new ConstructObject('divContent','divContainer')
objScroller.MoveArea(0,0)
objContainer.css.visibility='visible'
initialised=true;
}
// end absolutely positioned scrollable area object scripts

function MM_displayStatusMsg(msgStr) { //v1.0
status=msgStr;
document.MM_returnValue = true;
}
//-->
</SCRIPT>

<SCRIPT language=JavaScript>
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</SCRIPT>

<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff
onload="InitialiseScrollableArea();">
<!-- begin absolutely positioned scrollable area object-->
<DIV id=divUpControl><A href="javascript:;"
onmouseout=CeaseScroll();MM_swapImgRestore()
onmouseover="PerformScroll(-7);MM_displayStatusMsg('Scroll Up');MM_swapImage('scroller_up_button','','scroller_up_button_f2.gif',0);return document.MM_returnValue"><IMG
alt=Up border=0 height=18 name=scroller_up_button
src="scroller_up_button.gif" width=33></A></DIV>
<DIV id=divDownControl><A href="javascript:;"
onmouseout=CeaseScroll();MM_swapImgRestore()
onmouseover="PerformScroll(7);MM_displayStatusMsg('Scroll Down');MM_swapImage('scroller_down_button','','scroller_down_button_f2.gif',0);return document.MM_returnValue"><IMG
alt=Down border=0 height=18 name=scroller_down_button
src="scroller_down_button.gif" width=33></A></DIV>
<DIV id=divContainer>
<DIV id=divContent><B>Scroll Area Content Start</B>
<P><IMG align=left height=75 hspace=5
src="temp_dgm_roadster_small.jpg" vspace=5 width=100>An example to demonstrate
that the scrollable area can contain content other than text. Lorem ipsum
dolor sit amet, consectetur adipscing elit, sed diam nonnumy eiusmod tempor
incidunt ut labore et dolore magna aliquam erat volupat.</P>
<P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</P>
<P>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</P>
<P><IMG align=left height=75 hspace=5
src="temp_dgm_roadster_small.jpg" vspace=5 width=100>Et harumd dereud facilis
est er expedit distinct. Nam liber a tempor cum soluta nobis eligend optio
comque nihil quod a impedit anim id quod maxim placeat facer possim omnis
es voluptas assumenda est, omnis dolor repellend. Temporem autem quinsud
et aur office debit aut tum rerum necesit atib saepe eveniet ut er repudiand
sint et molestia non este recusand.</P>
<P>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</P>
<P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</P>
<P>Lorem ipsum dolor sit amet, consectetur adipscing elit, sed diam nonnumy
eiusmod tempor incidunt ut labore et dolore magna aliquam erat volupat.</P>
<P>Et harumd dereud facilis est er expedit distinct. Nam liber a tempor cum
soluta nobis eligend optio comque nihil quod a impedit anim id quod maxim
placeat facer possim omnis es voluptas assumenda est, omnis dolor repellend.
Temporem autem quinsud et aur office debit aut tum rerum necesit atib saepe
eveniet ut er repudiand sint et molestia non este recusand.</P><B>Scroll Area
Content End</B> </DIV></DIV>
<!-- end absolutely positioned scrollable area object -->
</BODY></HTML>

<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}

function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->
</script>
 
Discussioni simili
Autore Titolo Forum Risposte Data
F impedire scroll verticale Javascript 0
F impedire scroll verticale jquery Javascript 0
Y scroll bar verticale in firefox HTML e CSS 2
L DIV scroll verticale HTML e CSS 3
F Animazione testo sito web diminuire grandezza di un testo allo scroll Javascript 0
M Posizionare una tabella con scroll su un elemento specifico PHP 3
E Div che scompare con scroll jquery Javascript 0
tomorc [HTML] Problema con scroll bar (risolto) HTML e CSS 0
L Cambiare classi solo scroll up jQuery 2
A [Javascript] [PHP] Scroll refresh chat Javascript 2
M [Javascript] Visualizza contenuto file XML aggiornato con text scroll Javascript 0
L Aggiungere contenuto con ajax durante lo scroll jQuery 1
T [HTML] Problema pulsante scroll down su ecommerce CMS (Content Management System) 0
O Allo scroll cambiare colore di sfondo jQuery 0
simone gatti [PHP] Problema scroll "content" PHP 2
U div fisso che ad un certo punto dello scroll scompare jQuery 3
F [HTML] Div in scroll insieme alla pagina HTML e CSS 0
A [Javascript] avviare un animazione js allo scroll della pagina Javascript 7
G Modificare navbar in base allo scroll jQuery 6
otto9due Apparizione e scomparsa div in base allo scroll pagina jQuery 4
giuseppe_123 [WordPress] scroll post WordPress 2
K Transazioni durante lo scroll della home page Javascript 2
P infinite scroll: quali i parametri corretti? WordPress 0
Jonn [Javascript] Cambiare colore sfondo div allo scroll del mouse Javascript 3
Marco_88 scroll in un div specifico Javascript 6
M Scroll che mostra e nasconde elementi Javascript 2
N Div metà fisso e metà scroll HTML e CSS 4
voldemort Sfondo parallasse con scroll e ritardo Javascript 1
felino [HTML] DIV menu fisso durante lo scroll HTML e CSS 5
D Problema con lo scroll della pagina e del div position:fixed HTML e CSS 0
F Animazione jQuery scroll - ancore, si può fare? Javascript 1
L [RISOLTO]Pagina PHP jquery Mobile non funziona scroll nella pagina jQuery 3
I spostare div in base all'altezza dello scroll della pagina Javascript 1
J attivare sezioni sito scroll jQuery 1
J javascript sito scroll Javascript 4
Mauro Guardiani scroll Discussioni Varie 0
L Scroll in Basso Chat Javascript 0
L Infinite Scroll Javascript 1
T Realizzazione "scroll" orizzontale Javascript 4
F scroll thunbnail Joomla 2
P scroll veeticale di un testo Javascript 1
B Aiuto per scroll div jQuery 4
P Problema visualizzazione pulsanti dopo scroll jQuery 6
Mauro Guardiani infinite scroll Discussioni Varie 0
Mauro Guardiani auto scroll Discussioni Varie 0
F Scroll e movimento nella pagina personalizzato Javascript 1
M Scroll del Sito Javascript 0
P Lightbox + Smooth Scroll Horizontal Javascript 1
D Scroll NEWS in php PHP 1
W Scroll Images tipo "Dock Menu" Ajax 3

Discussioni simili