# [web] New WebPage Javascript problems

This topic is 4458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello this is my new webpage http://www.freewebs.com/supaflyfrank/Business.html i like the look of it alot better and I wanted to be able to have my page no scroll vertically like most webpages but instead only a certain area where the text is located scrolls. So the menu banner and everything stays the same and if they want to click on a new menu item they can just click it instead of scrolling up then clicking. But my problem is my code i use positions the div tag depending on the inner width of the browswer. But for some reason it works perfectly sometimes and other times it messes up by about 3 pixels. And I cant figure it out. And another problem that I am having is my javascript for IE. It complains that : Line : 53 document.all.layerName is null or not an object in my layerlib.js file. http://freewebs.com/supaflyfrank/layerlib.js the first problem i mention is on Firefox and the second problem is on IE. Any way anyone can assist me please thank you.

##### Share on other sites
I'm having a quick guess here, but;

Quote:

Shouldn't that be;

window.onresize = Resizing();

I'm sorry if that's a dumb question, I just haven't seen that syntax before.

Daed.

##### Share on other sites
function setY(layerName,y){	var theLayer = getElement(layerName);	if (layerobject)		theLayer.top = y	else if (opera)		theLayer.style.pixelTop = y;	else 		theLayer.style.top = y+"px";}

Your missing a ';' (Semicolon) on

theLayer.top = y (;)

Hope that helps,

Daed.

##### Share on other sites
I dont know why I missed that but it seems that was the problem. Any idea on how to make it work on IE?

##### Share on other sites
Quote:
Original post by Daedalus AI
I'm having a quick guess here, but;

Quote:

Shouldn't that be;

window.onresize = Resizing();

I'm sorry if that's a dumb question, I just haven't seen that syntax before.

Daed.

If he wants the function objects than the function the first statements are correct. If he wants the returned value from the functions then the second statement is correct. However, window.onresize needs a function object so the first statements are probably correct.