also, how do i change the position of a layer (y offset)
so when i put mouse over a link it will move the layer to the top-left corner of the page even when the page is scrolled...
http://localhost/korndragon/index.php?view=tutorials&id=1
when you put your mouse over a pic it will put that image in the layer at the top-left, but i cant eem to get it to change position when the page is scroled down... (goto the link and see what i mean) i can get it to work in IE but nit NS
You might want to rearrange how you have the table split. If you have it split into rows and columns, where only the middle section expands based on content, you'll resolve most of your problems, I think.
Quote: Originally posted by Suzanne Oooh. It doesn't work in opera, either.
You might want to rearrange how you have the table split. If you have it split into rows and columns, where only the middle section expands based on content, you'll resolve most of your problems, I think.
how am i supposed to have just the content area expand, and not the rest?
i guess i cant please every1! lol:D
thnx, i se how that can make my code more universal, but i still need to finf out what property netscape uses that is equal to "eval(scrolled)
" that will find how far the page has been scrolled.
also, how do i make a table height="100%" in netscape?
"And works for me in NS. "...
if you would look at http://cgi.korndragon.net in NS - the page is supposed to stretch 100% vertically.. but it wont, also the right side doesn't strech 100%...
when i use your function, IE return the error "'pageYOffset' is undefined"
Um, korndragon -- if you rearrange the table so it's three rows and three columns, you would have the top row and bottom row fixed height (filled with images only, no variables) and then the middle cell of the middle row would control the middle outside columns' height, and expand as necessary.
It's not a matter of pleasing everyone, it's a matter of knowing how to create the tables, if you're going to use them, so you don't tear your hair out.
P.S. If you don't have content in the cells, Netscape will "efficiently" reduce the cells to nothing. It doesn't consider the background to be a holding element (because it isn't). The only way to force it open would be to hitch it to the other cells. Your code is unnecessarily complex.
I suspect you are trying to use a wyiwyg?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
korndragon posted this at 19:29 — 4th May 2002.
They have: 87 posts
Joined: Dec 2001
also, how do i change the position of a layer (y offset)
so when i put mouse over a link it will move the layer to the top-left corner of the page even when the page is scrolled...
http://localhost/korndragon/index.php?view=tutorials&id=1
when you put your mouse over a pic it will put that image in the layer at the top-left, but i cant eem to get it to change position when the page is scroled down... (goto the link and see what i mean) i can get it to work in IE but nit NS
please help!!!
http://www.newbie-developer.com - Newbie web-developer community.
nike_guy_man posted this at 19:32 — 4th May 2002.
They have: 840 posts
Joined: Sep 2000
Korndragon your link there is on your own machine... do you have a public IP or URL?
What NS version do you want to know about?
korndragon posted this at 19:36 — 4th May 2002.
They have: 87 posts
Joined: Dec 2001
oops, i meant to post
http://cgi.korndragon.net/index.php?view=tutorials&id=1
im have ns6 for testing
im trying to make my page NS compatiable.
how do i set the property 'valign="top"' in NS?
http://www.newbie-developer.com - Newbie web-developer community.
Suzanne posted this at 19:53 — 4th May 2002.
She has: 5,507 posts
Joined: Feb 2000
By using valign="top" in the where it belongs. What are you trying to do?
Suzanne posted this at 19:55 — 4th May 2002.
She has: 5,507 posts
Joined: Feb 2000
Oooh. It doesn't work in opera, either.
You might want to rearrange how you have the table split. If you have it split into rows and columns, where only the middle section expands based on content, you'll resolve most of your problems, I think.
korndragon posted this at 20:00 — 4th May 2002.
They have: 87 posts
Joined: Dec 2001
how am i supposed to have just the content area expand, and not the rest?
i guess i cant please every1! lol:D
http://www.newbie-developer.com - Newbie web-developer community.
niqueco posted this at 23:30 — 4th May 2002.
They have: 3 posts
Joined: May 2002
Some things that can be useful...
In your page I see...
ie=document.all?1:0
ns=document.layers?1:0
Note that Mozilla, Galeon, Netscape (>= 6) will have both as false!
My recommendation is not to use this but test for the feature you need instead.
e.g. instead of...
if (ie) el.style.top=eval(scrolled)
if (ns) el.pic.top = top.pageYOffset;
...you might use thu more robust:
if (el.style) el.style.top=eval(scrolled)
else if (el.pic.top) el.pic.top = top.pageYOffset;
Hope it helps..
korndragon posted this at 00:07 — 5th May 2002.
They have: 87 posts
Joined: Dec 2001
thnx, i se how that can make my code more universal, but i still need to finf out what property netscape uses that is equal to "eval(scrolled)
" that will find how far the page has been scrolled.
also, how do i make a table height="100%" in netscape?
http://www.newbie-developer.com - Newbie web-developer community.
niqueco posted this at 01:23 — 5th May 2002.
They have: 3 posts
Joined: May 2002
Isn't that pageYOffset?
And works for me in NS.
Oops...
scrolled=n?"window.pageYOffset":"document.body.scrollTop"
won't work in NS6. And why using eval? I would use a function:
function getScrolled()
{
if(pageYOffset)
return pageYOffset;
else if(document.body && document.body.scrollTop)
return document.body.scrollTop;
else return 0
}
I haven't tried it though.
korndragon posted this at 01:30 — 5th May 2002.
They have: 87 posts
Joined: Dec 2001
"And works for me in NS. "...
if you would look at http://cgi.korndragon.net in NS - the page is supposed to stretch 100% vertically.. but it wont, also the right side doesn't strech 100%...
when i use your function, IE return the error "'pageYOffset' is undefined"
i hate netscape!!! so much f+++in trouble
http://www.newbie-developer.com - Newbie web-developer community.
korndragon posted this at 01:48 — 5th May 2002.
They have: 87 posts
Joined: Dec 2001
ok, i finally got the damn layer position fixed... now i just need to make it so the layout streches 100% vertically
here is the code for the damn thing...
<script>
ie=document.all?1:0
n=document.layers?1:0
function getScrolled()
{
if(pageYOffset)
return pageYOffset;
else if(document.body && document.body.scrollTop)
return document.body.scrollTop;
else return 0
}
function change_content(obj, pic, show) {
if (document.getElementById) {
el = document.getElementById(obj) ;
}
else if (document.all){
el = document.all[obj];
}
else if (document.layers) {
el = document.layers[obj];
}
if(show == 1) {
el.innerHTML = ""
if (el.style) {
if(ie) el.style.top=eval(scrolled)
else el.style.top=getScrolled()
}
else if (el.style) el.pic.top = getScrolled();
}
else el.innerHTML = ""
}
</script>
http://www.newbie-developer.com - Newbie web-developer community.
Suzanne posted this at 01:55 — 5th May 2002.
She has: 5,507 posts
Joined: Feb 2000
Um, korndragon -- if you rearrange the table so it's three rows and three columns, you would have the top row and bottom row fixed height (filled with images only, no variables) and then the middle cell of the middle row would control the middle outside columns' height, and expand as necessary.
It's not a matter of pleasing everyone, it's a matter of knowing how to create the tables, if you're going to use them, so you don't tear your hair out.
Suzanne posted this at 01:59 — 5th May 2002.
She has: 5,507 posts
Joined: Feb 2000
P.S. If you don't have content in the cells, Netscape will "efficiently" reduce the cells to nothing. It doesn't consider the background to be a holding element (because it isn't). The only way to force it open would be to hitch it to the other cells. Your code is unnecessarily complex.
I suspect you are trying to use a wyiwyg?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.