473,881 Members | 1,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Iframes and Mouse Position

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_for iframe.html" is just a html file with
a background layer using a "DIV" tag.

<Div id='Main_Page_B ackground'
style='position :absolute;
filter:alpha(op acity=60);
clip:rect(0,500 0,5000,0);
width:1px;heigh t:1px;
left:0px;top:0p x;z-index:50'>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td bgcolor="#AAAAA A" background="img s/background_meta lback.jpg">
<img src="imgs/trans.gif" id="main_page_b g" width=5000 height=5000
border=0>
</td></tr></table>
</Div>


<html>
<head>

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

</head>

<body bgcolor="#CCCCC C">
<Div id='Main_Backgr ound_Iframe'
style='position :absolute;
visibility:hidd en;
clip:rect(0,500 0,5000,0);
width:1px;heigh t:1px;
left:0px;top:0p x;z-index:50'>
<iframe src="background _foriframe.html " width="5000" height="5000"
name="backgroun d_iframe" frameborder="0" scrolling="no"
allowtransparen cy="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="JavaS cript">

var ms_x, x_offset;

var ms_y, y_offset;
document.onmous emove = cm_mouseMove;
//--MOUSE MOVE-----------------------
function cm_mouseMove(e) {
ms_x = event.x+documen t.body.scrollLe ft;
ms_y = event.y+documen t.body.scrollTo p;

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

document.xy_dis play.xcoord.val ue = ms_x;
document.xy_dis play.ycoord.val ue = 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_Di spay_Assembly"
style="position :absolute;
width:100; height:100;
clip:rect(0,500 ,500,0);
left:0px;top:0p x;z-index:200;">

<form name="xy_displa y">

<Div id="XY_Coord_Ba ckground"
style="position :absolute;
filter:alpha(op acity=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.g if" border=0
</td></tr></table>
</Div>

<Div id="X_Coor_Disp lay"
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="backgrou nd-color:transpare nt;
color:black";>
</td></tr></table>
</Div>

<Div id="Y_Coor_Disp lay"
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="backgrou nd-color:transpare nt;
color:black";>
</td></tr></table>
</Div>

<Div id="X_Coor_Disp lay"
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="backgrou nd-color:transpare nt;
color:black";>
</td></tr></table>
</Div>

<Div id="Y_Coor_Disp lay"
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="backgrou nd-color:transpare nt;
color:black";>
</td></tr></table>
</Div>
</form>

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

</html>

Sep 22 '06 #1
19 5950

<wm****@yahoo.c omwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
>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?
Sep 22 '06 #2
richard wrote:
<wm****@yahoo.c omwrote in message
news:11******** **************@ e3g2000cwe.goog legroups.com...
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?

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.

Sep 22 '06 #3
wm****@yahoo.co m wrote:
<snip>
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?

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 22 '06 #4
Jonathan N. Little wrote:
wm****@yahoo.co m wrote:
<snip>
>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.
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.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 22 '06 #5
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.

--
Charles Sweeney
http://CharlesSweeney.com
Sep 22 '06 #6
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.
The OP didn't mention an intranet. Since he posted to alt.html, we can
only assume that he was talking about the Web.
Sep 22 '06 #7
wm****@yahoo.co m wrote:
richard wrote:
><wm****@yahoo. comwrote in message
news:11******* *************** @e3g2000cwe.goo glegroups.com.. .
>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?


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?
--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
Sep 22 '06 #8
Bob Barrows [MVP] wrote:
Jonathan N. Little wrote:
>wm****@yahoo.co m wrote:
<snip>
>>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.

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.
Gee that doesn't seem to be to tone of your glorious leader!

http://www.microsoft.com/mscorp/exec...perability.asp
Executive E-Mail: Bill Gates on Interoperabilit y

Guess he can talk the talk but not walk the walk....

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Sep 22 '06 #9
Bob Barrows [MVP] wrote:
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.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Sep 22 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
22757
by: punkin | last post by:
I am trying to catch mouse position on the entire screen by dynamically generating mouse click event at every 100 ms. My code only works for IEs but not any Netscape or Gecko-based browsers. The following are the problems and I hope that there is someone who can enlighten me or give me some pointers. Also, my testing code is attached at the end. And please don't ask me why I am doing this - it is one of functional requirements by all...
3
6641
by: NullBock | last post by:
Hey, so I'm trying to put two iframes on a page adjacent to each other. here's my code : <html> <head><style type="text/css"> body { margin: 0; }
5
7971
by: gsb | last post by:
I track the mouse location like this code: function mousePos(e) { var p = new Object(); if(e) { p.x = e.pageX; p.y = e.pageY; } else { p.x = event.x; p.y = event.y; } ... (show) } document.onmousemove=mousePos; Seems to do fine on many browsers.
3
2718
by: Emjay | last post by:
Newbie needs to know how to set the mouse position.
1
4821
by: mike | last post by:
I have an iframe defined as per below and when I move the mouse towards the outside of the iframe then the iframe moves like it is suppose to, but when i move the mouse towards the content of the iframe then the iframe stops moving until I traverse the content and the mouse is again over the iframe border. <iframe id="dwindow1" name="dwindow1" src="lean_field_help_blank.cfm" scrolling="no" marginwidth="0" frameborder="0" width="487"...
1
5585
by: Grimm | last post by:
I am developing an internalk inteface that integrates alot of seperate tools into one interface. The current version uses one Iframe inside a div layer for positioning. Currently the seperate web tools do not have the ability to stay active. As you switch from tool to tool the previous information is lost unless you use a Back button. I need to place multiple div layers with I frames in them that can be shown or hidden based on selection. The...
0
1339
by: hinchb | last post by:
I have coded a Non-CSS menu using IFRAMES which I would like your opinion on. It seems to work in all the browsers I've tested. Do you see any disadvantages in using something like this. Here is the code. <style> #top { position: absolute; left: 4%;
2
3152
by: markszlazak | last post by:
In the following script, a control displays (black box) in each table cell once you mouse over the cell. Mouse down on the control to change the mode of the table. Drag the mouse over cells in the same column then mouseup anywhere in a cell. The mouseup event sometimres fires before the selection of table cells by dragging is complete. It's important that I stop these "false" mouseup's from firing or distinguish them from when I let go of...
4
6984
by: mike | last post by:
I have the opportunity to rescue a project that uses a mouse to sense the relative position of a machine. The hardware is built...just needs to be programmed. Stop snickering!!! I didn't do it...I just gotta fix it. I need to make some calculations on the measurements and VB6 is my language. Yes, the system mouse will corrupt the measurement, but it's an auditing function and that's acceptable.
0
9931
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11104
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10724
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10403
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9556
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7953
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5781
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5978
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.