Place elements before loading images

J

josvanr

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
 
E

Evertjan.

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"? ;-)
 
T

Tomasz Cenian

(e-mail address removed) 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.
 
J

josvanr

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

Jos
 
E

Evertjan.

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.
 
J

josvanr

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.?
 
T

Tomasz Cenian

(e-mail address removed) 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.
 
J

josvanr

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.
 
E

Evertjan.

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.
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Tue, 1
Mar 2005 16:30:22, seen in Evertjan.
wrote on 01 mrt 2005 in comp.lang.javascript:


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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top