Closed Thread Icon

Topic awaiting preservation: Positioning DIV's with JS and Opera is Poo! Pages that link to <a href="https://ozoneasylum.com/backlink?for=8061" title="Pages that link to Topic awaiting preservation: Positioning DIV&amp;#039;s with JS and Opera is Poo!" rel="nofollow" >Topic awaiting preservation: Positioning DIV&#039;s with JS and Opera is Poo!\

 
Author Thread
Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 02-02-2002 05:43

Does opera 5/6 have an onResize event handler?

I thought by version 6 they would have but it just doesn't seem to work.

Go see for yourself.

There's also another small problem I've run into regarding Netscape 4 and the re-positioning. If you shrink the window size down after the inital load or a refresh things get funky. The Div's contents start to warp for no reason and I get browser scroll bars when there shouldn't be any.

Is this that odd netscape resize bug I've heard about?

As always, any help would be appreciated.

Edit: Oh, please excuse my overly long winded code. The site's still in it's early stages. And I know the MouseOvers are buggy, I'm still workin on em.



[This message has been edited by Dracusis (edited 02-02-2002).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 02-02-2002 08:24

Opera still doesn't have onResize event. Workaround is to use timers and monitor window dimensions...

Only problem with positioning that I experienced in NN4 is with the last menu item (links). "text_links.jpg" image was located below that triangle thingy (it was wrapped for some unknown reason). You can try to enclose triangle and that other image with <nobr></nobr> tag and see will it fix the problem, like this:

<nobr><img id="img_links" name="img_links" src="images/triangle.gif" width="20" height="25" border=0 alt="Links" /><img src="images/text_links.jpg" width="109" height="25" border=0 alt="Links" /></nobr>

Oh, and your rollover function doesn't work in NN4. To make it work in NN4 you'll have to use the following code to change images:

document.layers[layerNameWhereIsImage].document.images.[imgName].src = 'blah';

And one last thing, you should move the following code outside menuLight() function (since it doesn't need to be called on each function call):

imgOut = new Image(); imgOut.src = "./images/triangle_out.gif"
imgOver = new Image(); imgOver.src = "./images/triangle2.gif"


Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 02-02-2002 13:52

Yeah. I assumed Opera didn't support onresize so I se up an eternal timer to re position the content. I didn't think about checking the window sizes though. I was just re-positioning the content regardless but I should be able to save needless processing if I use monitors.

Since I'm going to be using a preloader I figured I could just code the image swapping directly into the mouseover events. Seems to work a lot better but thanks for the reference tip. I never knew that the NN4 dom nested images inside layes.

I'm also slowly cleaning up the code. I've always had a hard time coding things the short way the first time around. So I usualy write god awfully long winded functions that grow smaller and smaller towards the completion of the site.

Anyway. Thanks for the advice max.

« BackwardsOnwards »

Show Forum Drop Down Menu