• 27.04.2024, 23:19
  • Register
  • Login
  • You are not logged in.

 

Dear visitor, welcome to Aqua Computer Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 1:20pm

Hi, warum läuft das folgende Script nicht mit dem MoZilla?
Guckst du hier

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<script>
var bildhoehe=0;
var speed=1;
function mitscroll() {
if (document.body.scrollTop>bildhoehe) {bildhoehe=bildhoehe+speed; speed=speed+1; if (speed>20) speed=20; }
if (document.body.scrollTop<bildhoehe) {bildhoehe=bildhoehe-speed; speed=speed+1; if (speed>20) speed=20;}
if (document.body.scrollTop-bildhoehe<20 && document.body.scrollTop-bildhoehe>-20)
{
bildhoehe=document.body.scrollTop;
speed=1;
}

document.all.banner.style.top=bildhoehe;
document.all.banner.style.left=(screen.width/2)-(737/2);
setTimeout("mitscroll()", 1)
}
</script>

<body onLoad="return mitscroll();">
<img src="http://mitglied.lycos.de/daywalker313/stgc3_gfx/stgcbanner.gif" ID="banner" style="position: absolute; cursor: pointer;" OnClick="javascript:void(window.open('http://www.go2gameserver.net','Info'));">
T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>
T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>T<br>
</body>
</html>

cK

Senior Member

Re: Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 2:21pm

Hi,

ich würde mal raten, dass der MoZilla die "scrollTop"- oder eine andere Methode nicht kennt, weil sie evtl. nicht W3C-Konform ist.
Methoden wie beispielsweise "scrollIntoView" gibts ja auch nur im IE.

Das Script hab' ich nicht im Mozilla getestet, aber vielleicht hat der einen Debugger für sowas. Der sagt dir dann, womit er nicht einverstanden ist.

cK

Re: Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 2:51pm

Danke für deine Antwort ;).
Wo wir grad schon dabei sind, gibt es eine Möglichkeit, das Image so zu fixieren, dass es beim Scrollen nicht "wackelt" sondern fest bleibt?
Zuerst hab ich einfach "document.all.banner.style.top=document.body.scrollTop;" genommen, aber dann wackelt es trotzdem...

Re: Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 3:30pm

was hälst du von der idee das ganze einfach in zwei frames zu packen?
oben der banner, wo das frame nicht scrollba is
und den rest dann da drunter in nem frame was man ganz normal scrollen kann?

Re: Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 3:45pm

Das geht technisch nicht.

Re: Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 6:11pm

Musst nur die beiden ".all"s in Zeile 14/15 entfernen

Re: Warum kann das MoZilla nicht?

Thursday, October 30th 2003, 6:40pm

Ahhh thx.
Nur noch ne Browserweiche schreiben und dann sollte es gehen.
Warum können die sich da eigentlich nicht mal nen Standard überlegen??

Re: Warum kann das MoZilla nicht?

Friday, October 31st 2003, 11:06am

ähm... es GIBT einen standard... laut W3C-konsortium...

nur es gibt einen einzigen browser der sich darum einen dreck schert:
Mirkosafts Hegemonialprodukt Internet Explorer! :P

die mannen um billyboy wollen einfachen allen andren ihre "standards" aufs aug drücken... keine andere firma ist mit denen einverstanden... aber keine andre firma hat 90% (?) marktanteil :(
8) there is no gravity - the world sucks 8)

LaNcom

Senior Member

Re: Warum kann das MoZilla nicht?

Friday, October 31st 2003, 5:32pm

Also, in KHTML geht's perfekt (Konqueror/ Linux, Safari/ OSX).
Aber warum so eine Konstruktion? Das geht auch ohne Script und ohne Frames (und ohne Ruckeln), CSS macht's möglich...
Guckst Du hier:
http://www.meyerweb.com/eric/css/edge/co…piral/demo.html

Allerdings hat IE so seine Probleme mit CSS2, und das IST W3C Konform, ich denke aber, dass es laufen sollte...
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989.