By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,310 Members | 1,988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,310 IT Pros & Developers. It's quick & easy.

Place elements before loading images

P: n/a
HI

I'm working on a site

http://www.josvanriswick.nl/nieuw

in which i use absolute positioning. On my pc at home i didn't notice,
but
now, as the site is on air and loading images is a bit slower, I notice
that
the positioning doesn't happen until after the images are loaded.
Probably
this is because I use 'onLoad' to call the function which centers my
elements. Is there a way to do positioning before the images have
loaded?

Jos

Jul 23 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
wrote on 01 mrt 2005 in comp.lang.javascript:
I'm working on a site

http://www.josvanriswick.nl/nieuw

in which i use absolute positioning. On my pc at home i didn't notice,
but
now, as the site is on air and loading images is a bit slower, I notice
that
the positioning doesn't happen until after the images are loaded.
Probably
this is because I use 'onLoad' to call the function which centers my
elements. Is there a way to do positioning before the images have
loaded?


Start with building a page without frames,
frames are evil if you want to use css and javascript,
IMHO of course.

Het ziet er verder best al mooi uit, hoor.

"Stillevens" of "Stille wens"? ;-)

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2

P: n/a
jo*****@xs4all.nl napisał(a):
HI

I'm working on a site

http://www.josvanriswick.nl/nieuw

in which i use absolute positioning. On my pc at home i didn't notice,
but
now, as the site is on air and loading images is a bit slower, I notice
that
the positioning doesn't happen until after the images are loaded.
Probably
this is because I use 'onLoad' to call the function which centers my
elements. Is there a way to do positioning before the images have
loaded?


Why are you using js to center the elements to begin with?
Use javascript to spice up your page, add some additional functionality,
never to get your page properly displayed.
A lot of users simply turn javascript off, imagine what they will see...

CSS is a correct and easy way to achieve this.

--
tomasz cenian tcenian at wa dot home dot pl
:::: :: : : http://cenian.boo.pl : : :: ::::
Jul 23 '05 #3

P: n/a
hmm why? Yes I suppose the fixed part in the top of
the page could also be done using a 'fixed' element..

Jos

Jul 23 '05 #4

P: n/a
wrote on 01 mrt 2005 in comp.lang.javascript:
hmm why? Yes I suppose the fixed part in the top of
the page could also be done using a 'fixed' element..


[please answer quoting relevant part of the original, this is not email,
but usenet]

Why not to use frames?

Many reasons, though strong meanings differ as usual.
<http://groups-beta.google.com/groups?q=frames.are.evil>
<http://www.google.com/search?q=frames.are.evil>

In your case because execution has to wait till the frames are loaded.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #5

P: n/a
Because I use absolute positioning and the positions
I have to give depend on the width of the browser window.
Maybe yes there are better ways to do this.?

Jul 23 '05 #6

P: n/a
jo*****@xs4all.nl napisał(a):
Because I use absolute positioning and the positions
I have to give depend on the width of the browser window.
Maybe yes there are better ways to do this.?


Most definetely there is a better way to do this. You should really rely
on CSS here.

--
tomasz cenian tcenian at wa dot home dot pl
:::: :: : : http://cenian.boo.pl : : :: ::::
Jul 23 '05 #7

P: n/a
Hm... ok. But as I use a redirect-url for my page, I won't
be able to get around using at least one frame. Also frames
are convenient for storing static javascript variables (I mean
variables that remain constant when one loads another page).
Anyhow, I'll dig in to css some more to see if there is a way
to solve it without using javascript in the first place.

Jul 23 '05 #8

P: n/a
wrote on 01 mrt 2005 in comp.lang.javascript:
Hm... ok. But as I use a redirect-url for my page, I won't
be able to get around using at least one frame. Also frames
are convenient for storing static javascript variables (I mean
variables that remain constant when one loads another page).
Anyhow, I'll dig in to css some more to see if there is a way
to solve it without using javascript in the first place.


Sorry, I stop anwering if you expect us to look back to previous postings,
because you don't provide quoting.

It is against netiquette. Read the FAQ.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #9

P: n/a
JRS: In article <Xn********************@194.109.133.29>, dated Tue, 1
Mar 2005 16:30:22, seen in news:comp.lang.javascript, Evertjan.
<ex**************@interxnl.net> posted :
wrote on 01 mrt 2005 in comp.lang.javascript:
Hm... ok. But as I use a redirect-url for my page, I won't
be able to get around using at least one frame. Also frames
are convenient for storing static javascript variables (I mean
variables that remain constant when one loads another page).
Anyhow, I'll dig in to css some more to see if there is a way
to solve it without using javascript in the first place.


Sorry, I stop anwering if you expect us to look back to previous postings,
because you don't provide quoting.

It is against netiquette. Read the FAQ.


The FAQ only says what should be done; in this case it appears necessary
to explain how it is done, since he uses Google. See below.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 23 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.