Iframes and Mouse Position

W

wmanzo

I have a really professional conspiracy movie site
and I use tons of layers and an external scroll bar assembly.
I would like to put the various sections into MS Iframes and
in order to clean up the page but I find that the iframes interfere
with the getting the mouse coords from the screen which is
essential in moving the scroll bar around.

My test html is given below. With the iframe hidden the mouse coords
are obtainable. With the iframe visible things get buggy.


Where the "background_foriframe.html" is just a html file with
a background layer using a "DIV" tag.

<Div id='Main_Page_Background'
style='position:absolute;
filter:alpha(opacity=60);
clip:rect(0,5000,5000,0);
width:1px;height:1px;
left:0px;top:0px;z-index:50'>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td bgcolor="#AAAAAA" background="imgs/background_metalback.jpg">
<img src="imgs/trans.gif" id="main_page_bg" width=5000 height=5000
border=0>
</td></tr></table>
</Div>




<html>
<head>

<base href=" ">
<meta http-equiv="imagetoolbar" content="no">

</head>



<body bgcolor="#CCCCCC">


<Div id='Main_Background_Iframe'
style='position:absolute;
visibility:hidden;
clip:rect(0,5000,5000,0);
width:1px;height:1px;
left:0px;top:0px;z-index:50'>
<iframe src="background_foriframe.html" width="5000" height="5000"
name="background_iframe" frameborder="0" scrolling="no"
allowtransparency="true">
</iframe>
</Div>


<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->



<script language="JavaScript">

var ms_x, x_offset;

var ms_y, y_offset;


document.onmousemove = cm_mouseMove;


//--MOUSE MOVE-----------------------


function cm_mouseMove(e){


ms_x = event.x+document.body.scrollLeft;
ms_y = event.y+document.body.scrollTop;

if (ms_x < 0){ms_x = 0;}
if (ms_y < 0){ms_y = 0;}

document.xy_display.xcoord.value = ms_x;
document.xy_display.ycoord.value = ms_y;




return false;

}


//--MOUSE MOVE-----------------------




</script>








<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->
<!--Click n Move Scripts-------------------------------------->





<!------------------------------->
<!--XY Coord Display------------->
<!------------------------------->


<Div id="XY_Coord_Dispay_Assembly"
style="position:absolute;
width:100; height:100;
clip:rect(0,500,500,0);
left:0px;top:0px;z-index:200;">

<form name="xy_display">

<Div id="XY_Coord_Background"
style="position:absolute;
filter:alpha(opacity=50);
width:100; height:100;
clip:rect(0,200,200,0);
left:0px; top:0px;z-index:100;">
<table border=0 cellpadding=0
cellspacing=0><tr><td>
<img src="imgs/xy_coord_body.gif" border=0
</td></tr></table>
</Div>

<Div id="X_Coor_Display"
style="position:absolute;
width:100; height:100;
clip:rect(4,33,17,2);
left:36px; top:0px;z-index:100;">
<table border=0 width=38 cellpadding=0 cellspacing=0><tr><td>
<input type="text" size="5" name="xcoord" value="0"
style="background-color:transparent;
color:black";>
</td></tr></table>
</Div>

<Div id="Y_Coor_Display"
style="position:absolute;
width:100; height:100;
clip:rect(4,33,17,2);
left:36px; top:15px;z-index:100;">
<table border=0 width=38 cellpadding=0 cellspacing=0><tr><td>
<input type="text" size="5" name="ycoord" value="0"
style="background-color:transparent;
color:black";>
</td></tr></table>
</Div>

<Div id="X_Coor_Display"
style="position:absolute;
width:100; height:100;
clip:rect(4,33,17,2);
left:36px; top:32px;z-index:100;">
<table border=0 width=38 cellpadding=0 cellspacing=0><tr><td>
<input type="text" size="5" name="x_layer" value="0"
style="background-color:transparent;
color:black";>
</td></tr></table>
</Div>

<Div id="Y_Coor_Display"
style="position:absolute;
width:100; height:100;
clip:rect(4,33,17,2);
left:36px; top:48px;z-index:100;">
<table border=0 width=38 cellpadding=0 cellspacing=0><tr><td>
<input type="text" size="5" name="y_layer" value="0"
style="background-color:transparent;
color:black";>
</td></tr></table>
</Div>


</form>

</Div>
<!------------------------------->
<!--XY Coord Display------------->
<!------------------------------->





</html>
 
R

richard

I have a really professional conspiracy movie site
and I use tons of layers and an external scroll bar assembly.
I would like to put the various sections into MS Iframes and
in order to clean up the page but I find that the iframes interfere
with the getting the mouse coords from the screen which is
essential in moving the scroll bar around.

My test html is given below. With the iframe hidden the mouse coords
are obtainable. With the iframe visible things get buggy.

A lot of people might want to see the work in action. So they can see
firsthand what problems might be.
If you have a working page, with the errors you're seeking to correct,
posting the link would help.
I did notice you're using inline "style" as opposed to an off page CSS file
or even defining in the "head".
As well as embedded javascript.

The major problem with an iframe is, it is still a page by itself somewhere
else on your site.
What you need is a script that will reach out to that other page and work
with it.

Also what's the point of having such a huge iframe and no scrolling?
How am I expected to see what else there is?
 
W

wmanzo

richard said:
A lot of people might want to see the work in action. So they can see
firsthand what problems might be.
If you have a working page, with the errors you're seeking to correct,
posting the link would help.
I did notice you're using inline "style" as opposed to an off page CSS file
or even defining in the "head".
As well as embedded javascript.

The major problem with an iframe is, it is still a page by itself somewhere
else on your site.
What you need is a script that will reach out to that other page and work
with it.

Also what's the point of having such a huge iframe and no scrolling?
How am I expected to see what else there is?


When the Iframe is included on this sparse test page
the readout of the mouse position crashes which
means that the iframe is causing problems when it
should have no effect on obtaining the mouse
coords. If you look at my index_1.html page at
mansueact.com you'll find all your answers__all the
divs are visible and all the scripting is visible. I'd like
to tidy up the page with Iframes where the scripts
associated with the layers would be contained in
the corresponding iframe. The page would then just
be a group of Div tags with nested Iframe tags and I
would then be moving around the Divs and calling
functions in the Iframes. But the user wouldn't know this.

I'm assuming that if I can get the mouse coords with an
iframe visible then I can make the rest of the page work.

The major problem is my page scroll bar and that the user
cannot click and move it around the page when I use
Iframes. And, it is a very neat scroll bar.

Also, I only use and code for MSIE.

Thank you for your quick response.
From Orlando,

The Banished Celebrity Publisher.
 
J

Jonathan N. Little

Also, I only use and code for MSIE.

Well for last month on my site my server log showed only 53% MSIE and it
has been dropping from 98% just a few years ago. So you are okay with
turning away maybe half your audience. Oh! Wait! I doesn't work in IE
either...maybe you aught to rethink your design?
 
B

Bob Barrows [MVP]

Jonathan said:
Well for last month on my site my server log showed only 53% MSIE and
it has been dropping from 98% just a few years ago. So you are okay
with turning away maybe half your audience.

Have you never heard of intranets? or company policies requiring the use
of IE?
Oh right, you would never work for a such a dictatorial company.
 
C

Charles Sweeney

Bob Barrows [MVP] wrote
Have you never heard of intranets? or company policies requiring the use
of IE?
Oh right, you would never work for a such a dictatorial company.

Quite right too. I wouldn't work for any company if I could avoid it.
 
L

Leif K-Brooks

Bob said:
Have you never heard of intranets? or company policies requiring the use
of IE?
Oh right, you would never work for a such a dictatorial company.

The OP didn't mention an intranet. Since he posted to alt.html, we can
only assume that he was talking about the Web.
 
B

Brian Wakem

When the Iframe is included on this sparse test page
the readout of the mouse position crashes which
means that the iframe is causing problems when it
should have no effect on obtaining the mouse
coords. If you look at my index_1.html page at
mansueact.com you'll find all your answers__all the
divs are visible and all the scripting is visible. I'd like
to tidy up the page with Iframes where the scripts
associated with the layers would be contained in
the corresponding iframe. The page would then just
be a group of Div tags with nested Iframe tags and I
would then be moving around the Divs and calling
functions in the Iframes. But the user wouldn't know this.

I'm assuming that if I can get the mouse coords with an
iframe visible then I can make the rest of the page work.

The major problem is my page scroll bar and that the user
cannot click and move it around the page when I use
Iframes.


You have much bigger problems than that. Your site is completely screwed in
Konqueror.

And, it is a very neat scroll bar.

Also, I only use and code for MSIE.


You are joking, right?
 
D

Dave Anderson

Bob said:
Have you never heard of intranets? or company policies
requiring the use of IE?

Have you never hear of portals? I work for a company that forces the use of
IE on every machine. We still code to standards because our intranet is
iChain-accelerated for remote access by any browser anywhere. The OP's
company could do the same in a day and he would be instantly affected by the
choice to ignore browser diversity.
 
A

ASM

(e-mail address removed) a écrit :
The major problem is my page scroll bar and that the user
cannot click and move it around the page when I use
Iframes. And, it is a very neat scroll bar.

the browser has lost its lifts ?

there is no way to use css and rule overflow: scroll; ?
Also, I only use and code for MSIE.

and ?
Thank you for your quick response.

In my mind, you need in your pages displayed in iframe a similar
function as that in main page.

function iframe_mouseMove(e){
ms_x = event.x+document.body.scrollLeft;
ms_y = event.y+document.body.scrollTop;
if (ms_x < 0){ms_x = 0;}
if (ms_y < 0){ms_y = 0;}
parent.document.xy_display.xcoord.value = ms_x;
parent.document.xy_display.ycoord.value = ms_y;
return false;
}

Don't know reactions of main coordinate function in this case :-(
 
R

richard

Bob Barrows said:
Have you never heard of intranets? or company policies requiring the use
of IE?
Oh right, you would never work for a such a dictatorial company.

Most of us have heard of this. Obviously you must work for MSN.
AS this person has the page on a standard website, it therefor will be
available to the common man around the world.
One of the reasons I quit using IE was because it wouldn't render pages
correctly.
And if one has extremely sloppy code, as in this case, IE still manages to
render the page.
Therefor, IE does not conform to the standards of the W3C convention.
Which, BTW, IE was stolen from it's originator and M$ had to cough over a
huge bundle for the proper rights.
At least Firefox tries to conform to the W3C standards. IE never will and M$
don't give a shit.
Besides IE having numerous security leaks and bugs.
 
R

richard

When the Iframe is included on this sparse test page
the readout of the mouse position crashes which
means that the iframe is causing problems when it
should have no effect on obtaining the mouse
coords. If you look at my index_1.html page at
mansueact.com you'll find all your answers__all the
divs are visible and all the scripting is visible. I'd like
to tidy up the page with Iframes where the scripts
associated with the layers would be contained in
the corresponding iframe. The page would then just
be a group of Div tags with nested Iframe tags and I
would then be moving around the Divs and calling
functions in the Iframes. But the user wouldn't know this.

I'm assuming that if I can get the mouse coords with an
iframe visible then I can make the rest of the page work.

The major problem is my page scroll bar and that the user
cannot click and move it around the page when I use
Iframes. And, it is a very neat scroll bar.

Also, I only use and code for MSIE.

Thank you for your quick response.


The Banished Celebrity Publisher.

I looked at that page dude. It sucks.
Get rid of the scrolling binary crap on the notebork for starters.
If you insist on having it, at least put it to the right of the notebook.
Then there's all that mesh chain crap. Trash it.
As it stands now, the only thing I can read is where it says "top 10 alien
sites".
You do that shit to impress your coworkers, not for a real life website.
 
W

wmanzo

richard said:
I looked at that page dude. It sucks.
Get rid of the scrolling binary crap on the notebork for starters.
If you insist on having it, at least put it to the right of the notebook.
Then there's all that mesh chain crap. Trash it.
As it stands now, the only thing I can read is where it says "top 10 alien
sites".
You do that shit to impress your coworkers, not for a real life website.

Hey, got you fellas all in a tuss! My philosphy is that at this point
all
browsers should be standardized and if they ain't, I'm not going to
code for "cross" platform portability. I like the way MS js works
and it works for me. Also, did you note that I don't code using
java or c+++++ concepts. I code for humans because I am a human.
Imagine all those people who buy all those books on website design
and jscript and still cannot figure out how to move layers or
change background colors. What is oop? You don't have to be
a rocket scientist to understand loops and decision statements.

And, although the suggestion about putting the mouse functions in
the iframe it doesn't make any sense since the mouse coords are
absolute screen coords and, this is the kicker, the click and move
scripts and mouse coord scripts are in the main page not the iframes.

How many of you pro coders actually tried to get the mouse coords to
readout when the iframe is visible? It works perfectly when the iframe
is hidden. Sounds like a major bug but maybe not.

Anyway, my site is the most profession looking jscript movie site on
the
net which isn't saying much since the "net" as we know is quite fake.

Also, what about those clunky layer movements? How can various
layer movement intefere with each other or how can background
animations interfere with moving a layer from point a to point b?

Anyway, thank you for your responses who-ever you are and by the
lack of any real responses it is another indication that the net is
quite fake.
From the Orlando Hive where these Klan-Aliens have their brains
wave-wired to the net,

Wayne E. Manzo,
Banished Celebrity Publisher, Human Rights Leader, Scientist
www.mansueact.com
www.mansueact.com/american_resister
 
B

Ben Measures

Hey, got you fellas all in a tuss! My philosphy is that at this point
all browsers should be standardized

There are standards: said:
and if they ain't, I'm not going to code for "cross" platform
portability.

If you follow the standards, cross-platform comes free. Instead, you've
_chosen_ to ignore the standards and code for "single" platform.
I like the way MS js works and it works for me.

It's not about you - it's about your vistors. Of course, it's entirely
your prerogative to take the attitude of "screw the visitors, who needs
them anyways" - just don't expect to get any.
[...] I code for humans because I am a human.

It is computers, not humans, that interpret your code.
[snip irrelevant nonsense]

Anyway, my site is the most profession looking jscript movie site on the
net which isn't saying much since the "net" as we know is quite fake.

[...]

Anyway, thank you for your responses who-ever you are and by the lack of
any real responses it is another indication that the net is quite fake.

So what are you doing wasting your time here, if you think all is fake? I
smell a troll.
 
P

Paul Watt

Anyway, my site is the most profession looking jscript movie site on
the
net which isn't saying much since the "net" as we know is quite fake.

Also, what about those clunky layer movements? How can various
layer movement intefere with each other or how can background
animations interfere with moving a layer from point a to point b?

Anyway, thank you for your responses who-ever you are and by the
lack of any real responses it is another indication that the net is
quite fake.

wave-wired to the net,

Are you serious? You think your site looks professional? Tell me thats not a
animated GIF for your title? Wheres all my browser controls gone? I make the
decisions about what goes on with MY browser on MY computer, not you.

Plus that mouse over on the top ten lists only obscures the text.
I personally think that any site that relys on anything other than HTML and
CSS for the front end is fundermentaly flawed.
Start again, strip out all the crap - you don't need it, validate to w3c
standards then re-post here, i'm interested in the content.

--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info
 
B

BBM

Hey, got you fellas all in a tuss! My philosphy is that at this point
all
browsers should be standardized

Your'e right, they should.
and if they ain't, I'm not going to
code for "cross" platform portability.

Reasonable, though coding to the standards should give you portability
anyways...
I like the way MS js works
and it works for me.

I'm impressed by two statements: MS JS works, and MS JS works for you.
Both cases seem impossible.
Also, did you note that I don't code using
java or c+++++ concepts. I code for humans because I am a human.

So your visitors get to sift though your code to form an image of your
webpage in their mind?
Imagine all those people who buy all those books on website design
and jscript and still cannot figure out how to move layers or
change background colors.

Or, imagine all those people who look up free resources on website
design and jscript and manage to produce valid, portable, and effective
websites, while getting annoyed at people who haven't read anything and
are still using outdated and proprietary code.
How many of you pro coders actually tried to get the mouse coords to
readout when the iframe is visible? It works perfectly when the iframe
is hidden. Sounds like a major bug but maybe not.

What are you even using mouse coordinates for? I looked at your
homepage and your index_1.html in both FFX and IE, and noticed nothing
different depending on mouse position.
Anyway, my site is the most profession looking jscript movie site on
the
net which isn't saying much since the "net" as we know is quite fake.

If your site is the most professional looking, does that mean you've
cornered the market for 'jscript movie sites'? Because the only way I
could see it being the most professional looking was if it were the
only one in existence.
Anyway, thank you for your responses who-ever you are and by the
lack of any real responses it is another indication that the net is
quite fake.

The 'net is quite real. Lack of response just means other either A)
don't know the answer, B) haven't seen the question, or C) don't think
the question is worth answering.

Since your question was emailed to large numbers of people, (B) is
right out. Since this is a mailing list full of informed people on the
subject of webmasters ing creating webpages, I seriously doubt (A) is
true. By process of elimination, we come to (C) as the reason for
little response.


PS: neither page looked good in Internet Explorer, and much much MUCH
less so in Firefox.
 
W

wmanzo

Paul said:
Are you serious? You think your site looks professional? Tell me thats not a
animated GIF for your title? Wheres all my browser controls gone? I make the
decisions about what goes on with MY browser on MY computer, not you.

Plus that mouse over on the top ten lists only obscures the text.
I personally think that any site that relys on anything other than HTML and
CSS for the front end is fundermentaly flawed.
Start again, strip out all the crap - you don't need it, validate to w3c
standards then re-post here, i'm interested in the content.

--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info


Dear Paul,

I'm a publisher not a programmer or html coded. I utilize simple html,
layers,
and jscript to make my sites the best.When the "Feds-Klan" stops
censoring
my sites then I'll hire real humans to re-code. And, it is the "Feds
Klan"
or "Foo" who control the net, your computer, and even what you think.
Welcome to the real world.

If the site is censored, no use coding for other browsers? And,
since when is jscript not w3c compliant? I don't know much about
css or w3c because I'm a censored publisher who has been banished
but I do know that my stuff works on MSIE and that the books available
for web design and jscript are not really helpful to the general
public.
If you want to web design and utilize web dynamics then you don't
need to know what c++++++ or java is or OOP. And Paul, what is
photography or multi-media to a race of telepathic wave heads?
Nothing! Multimedia is a joke to the Foo community.

I can develop a book that would enable anybody to learn webdesign,html,
and jscript and develop functional interestng sites without learning
high level programming or even how to install "Dreamweaver" on their
computer. And, poor O'Reilly with his(her) stupid techical computer
books with their stupid covers will probably kill me.

Also, still having problems with my scrolling layer test page. As you
scroll a layer over an iframe the iframe inteferes with the scrolling
script because the xy mouse pos becomes rel to the iframe and not
absolute. Scripting for this situation becomes a little bit harder but
it may be possible. I wanted to load all my page sections into
individual iframes but the scrollbar situation occurred. I believe
that each layer should have access to the mouse coords regardless. So,
even when you mouse over an iframe the absolute coords should still be
obtained in the main page and in the iframe you should also have access
to the relative coords. So, if I used the xy coord display and scripts
in the iframe and main page, as the mouse is moved over the iframe you
should see the absolute coords in the main page display and the
relative coords in the iframe display. But, unfortunately it doesn't
work this way. I wonder why?
From Klan Orlando where Mickey has been enslaved and is forced to
walk around in public wearing a dress and high heals,

Wayne E. Manzo, Phd,Dsic
Banished Publisher, Human Rights Leader, Scientist
(e-mail address removed)
www.mansueact.com
http://www.mansueact.com/art/wem_art_911wtc.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top