Click to See Complete Forum and Search --> : need "scrolling" help...
prosto
06-02-2003, 10:57 AM
(.)what I need:
page Open -> loading </body> -> scroll down -> load <img>
(.)what I have:
<body onLoad="scrollTo(0,10000); return false">
<img>
</body>
=>it does work, but not the way I need, it loads after all imgs have loaded, I need direct after the page have opened.
=> HOW TO?
havik
06-02-2003, 11:01 AM
Once the browser has completed loading a web page, the onload event is triggered. This is why it page won't scroll until the page is done loading.
I'm curious as to why you want the pages to operate in this way.
Havik
prosto
06-02-2003, 11:05 AM
sorry "it SCROLS after all imgs have loaded"
prosto
06-02-2003, 11:15 AM
just experiment.... :-)
I know the way out, but not exactly I need:
(.) <img onLoad="scrollTo(0,10000); return false" src="/img/1x1.gif">
(.)but I want without loading <img> => WHAT ELSE DOES IT (onLoad="scrollTo(0,10000); return false") WORK WITH?
havik
06-02-2003, 11:22 AM
K, I'm having difficulty here so I just want to clarify it for myself.
This is what you want to happen:
1) The page opens
2) The page loads, and while loading you want to have the page scroll down as well
Is that right? Is that all?
Havik
prosto
06-03-2003, 11:15 AM
I want that kind of effect:
<html><body onLoad="scrollTo(0,10000); return false">
<center><b>I DON"T WANT YOU TO READ THIS</b></center>
<table width="100%" height="700" bgcolor="#99ff44">
<tr><td align="center" valign="bottom">I want it to be exactly this way, but if we paste an image, it loads imgs first
</td></tr></table><center>I WANT YOU TO READ <b>THIS FIRST</b></center></body></html>
even with 1x1 px GIF I get not what I want:
<html><body>
<center><b>I DON"T WANT YOU TO READ THIS</b></center>
<table width="100%" height="700" bgcolor="#99ff44">
<tr><td align="center" >
<img src="http://prosto-c.narod.ru/img/1px.gif" onLoad="scrollTo(0,10000); return false">
<img src="http://www.dj-polina.narod.ru/pol3.jpg">
<img src="http://www.dj-polina.narod.ru/news001.jpg">
<img src="http://www.dj-polina.narod.ru/lm.jpg">
<img src="http://bs.yandex.ru/count/727B6CBD/163/216/00000000/14619/46385">
</td></tr></table><center>I WANT YOU TO READ <b>THIS FIRST</b></center></body></html>
havik
06-03-2003, 10:32 PM
I experimented with javascript here:
// Inserted this right after the body tag and removed all the
// other code in the body tag
<script type="text/javascript">
window.scrollTo(0,10000);
</script>
...thinking that it would be the first element to load and run.
This is not the case because, I think, that browsers load all the elements of the page before anything is run.
Why not try using anchor tags instead? You'd get a similiar effect (can't guarantee that the page will scroll before it's done loading though).
Havik