Connecting Tech Pros Worldwide Forums | Help | Site Map

Place elements before loading images

josvanr@xs4all.nl
Guest
 
Posts: n/a
#1: Jul 23 '05
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


Evertjan.
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Place elements before loading images


wrote on 01 mrt 2005 in comp.lang.javascript:
[color=blue]
> 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?
>[/color]

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)

Tomasz Cenian
Guest
 
Posts: n/a
#3: Jul 23 '05

re: Place elements before loading images


josvanr@xs4all.nl napisał(a):[color=blue]
> 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?
>[/color]

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 : : :: ::::
josvanr@xs4all.nl
Guest
 
Posts: n/a
#4: Jul 23 '05

re: Place elements before loading images


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

Jos

Evertjan.
Guest
 
Posts: n/a
#5: Jul 23 '05

re: Place elements before loading images


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

[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)

josvanr@xs4all.nl
Guest
 
Posts: n/a
#6: Jul 23 '05

re: Place elements before loading images


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

Tomasz Cenian
Guest
 
Posts: n/a
#7: Jul 23 '05

re: Place elements before loading images


josvanr@xs4all.nl napisał(a):[color=blue]
> 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.?
>[/color]

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 : : :: ::::
josvanr@xs4all.nl
Guest
 
Posts: n/a
#8: Jul 23 '05

re: Place elements before loading images


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.

Evertjan.
Guest
 
Posts: n/a
#9: Jul 23 '05

re: Place elements before loading images


wrote on 01 mrt 2005 in comp.lang.javascript:
[color=blue]
> 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.
>[/color]

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)

Dr John Stockton
Guest
 
Posts: n/a
#10: Jul 23 '05

re: Place elements before loading images


JRS: In article <Xns960CB2168527Eeejj99@194.109.133.29>, dated Tue, 1
Mar 2005 16:30:22, seen in news:comp.lang.javascript, Evertjan.
<exjxw.hannivoort@interxnl.net> posted :[color=blue]
> wrote on 01 mrt 2005 in comp.lang.javascript:
>[color=green]
>> 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.
>>[/color]
>
>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.[/color]

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.
Closed Thread