Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-26-2002, 12:36 PM   PM User | #31
snakedevil1
New Coder

 
Join Date: Jun 2002
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
snakedevil1 is an unknown quantity at this point
It is impossible. That's weird.... But you can still use the documents.object or get elementbyid or something.style.left property and the top property, right?
__________________
Computers are simple for the complex mind, yet complex for the simple mind
snakedevil1 is offline   Reply With Quote
Old 06-26-2002, 12:43 PM   PM User | #32
snakedevil1
New Coder

 
Join Date: Jun 2002
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
snakedevil1 is an unknown quantity at this point
Well, according to netstat.com 95% of the users in this world use IE. But you still need get across to all the audience, even if it is 5%. I know a lot of people who use Netscape, I can't really figure out how it got to be five percent. Why don't you take a poll and ask your visitors what browsers they use. In my opinion, it depends upon your browser audience. So well ya, majority rules, and since everyone has IE (unless they are running linux), I don't see why they just can't open it up and go to your webpage.
__________________
Computers are simple for the complex mind, yet complex for the simple mind

Last edited by snakedevil1; 06-26-2002 at 12:46 PM..
snakedevil1 is offline   Reply With Quote
Old 06-26-2002, 01:08 PM   PM User | #33
snakedevil1
New Coder

 
Join Date: Jun 2002
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
snakedevil1 is an unknown quantity at this point
I found a couple of return position functions. I tested them and I think they work in Netscape 6:
function findPosX(obj)
{
var curleft = 0;
if (document.getElementById || document.all)
{
while (obj.offsetParent)
{
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}

function findPosY(obj)
{
var curtop = 0;
if (document.getElementById || document.all)
{
while (obj.offsetParent)
{
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}

I got it from http://www.xs4all.nl/~ppk/js/index.h...s/findpos.html
It has a very good article on finding the position of elements.
__________________
Computers are simple for the complex mind, yet complex for the simple mind
snakedevil1 is offline   Reply With Quote
Old 06-27-2002, 07:43 AM   PM User | #34
charon
Regular Coder

 
Join Date: Jun 2002
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
charon is an unknown quantity at this point
thanks a lot shake...
actually, I almost going to give up to find the solution already, this is because I have too many things to do, got another project in hand, so can't spend too much time to find out the solution. Anyway, will try it out when i'm free as for me nothing is impossible.

Guess won't be a big problem as my web-page look good in IE, in nestcape6, user can view the page as good as IE, unless they resize their window. I try already, even i change the screen resolution, the layer still associated with the Futurelaunches Link. So, should not be a big problem.

I have already went through (briefly) the site that you mentioned, it is really really really useful, thank for your guidance, really appreciate it. I will try to solve my problem with the code given by you within these two days, will keep you inform of my progress.

oh ya, forget to tell you, even I use, obj.style.left , i can't get any value too, the answer is "empty" or "blank" instead of underfine. Do you know why???

You are giving a very good response on my questions (may be to others as well), so, will never forget codingforums.com when i have any problems.
thanks again.
charon is offline   Reply With Quote
Old 06-27-2002, 09:28 AM   PM User | #35
charon
Regular Coder

 
Join Date: Jun 2002
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts
charon is an unknown quantity at this point
ya, more questions to ask...

I want to make a summary for IE and Nestcape: check for me whether my summarry is correct.

IE4, IE4+, IE5, IE5+, IE6 = Support document.all
IE5, IE5+, IE6 = Support document.getElementId

NS4, NS4+, NS5 = Support document.layers
NS6, NS+ = Support document.getElementId

Please advice.
charon is offline   Reply With Quote
Old 06-27-2002, 05:32 PM   PM User | #36
snakedevil1
New Coder

 
Join Date: Jun 2002
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
snakedevil1 is an unknown quantity at this point
Cool

Ya, im pretty sure thats right. If you have anymore questions, feel free to ask ! 8)
__________________
Computers are simple for the complex mind, yet complex for the simple mind
snakedevil1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:41 PM.


Advertisement
Log in to turn off these ads.