Hello -
Yes - I know floating/persistent layers can be yucky - but for this project it is only tiny and contains some xy mouse coordinates for a map...
buy anyway - here's my problem:
I have a javascript that keeps the layer persistent for the HEIGHT, but not WIDTH in IE7.
Of course it works great in the other browsers... Can anyone see what is wrong with the script? Any help would be so good - I have tried everything my limited knowledge will allow! -
<!--Here is where Part the XY Script starts-->
-
<div id="divBottomLeft" style="position:absolute">
-
-
<!-- MY Layer contents -->
-
-
</div>
-
-
<!--Below is the troublesome floating layer script-->
-
-
<script type="text/javascript">
-
var ns = (navigator.appName.indexOf("Netscape") != -1);
-
var d = document;
-
var px = document.layers ? "" : "px";
-
function JSFX_FloatDiv(id, sx, sy)
-
{
-
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
-
window[id + "_obj"] = el;
-
if(d.layers)el.style=el;
-
el.cx = el.sx = sx;el.cy = el.sy = sy;
-
el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px; this.style.right=y+px; this.style.bottom=y+px;};
-
el.flt=function()
-
{
-
var pX, pY;
-
pX = ns ? pageXOffset : document.documentElement && document.documentElement.scrollLeft ?
-
document.documentElement.scrollLeft : document.body.scrollLeft;
-
if(this.sx<0)
-
pX += ns ? innerWidth : document.documentElement && document.documentElement.clientX ?
-
document.documentElement.clientX : document.body.clientX;
-
pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ?
-
document.documentElement.scrollTop : document.body.scrollTop;
-
if(this.sy<0)
-
pY += ns ? innerHeight : document.documentElement && document.documentElement.clientY ?
-
document.documentElement.clientY : document.body.clientY;
-
this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
-
this.sP(this.cx, this.cy);
-
setTimeout(this.id + "_obj.flt()", 40);
-
}
-
return el;
-
}
-
-
JSFX_FloatDiv("divBottomLeft", 5, -40).flt();
-
-
-
</script>
-
3 4640
Oops! Still buggered but have changed clientX etc to clientWidth etc
so now it's: -
<!--Here is where Part the XY Script starts-->
-
<div id="divBottomLeft" style="position:absolute">
-
<form name=ee><input name=sd type=text style="color: white; background-color: #706d66" size="8">
-
</input>
-
</form>
-
-
<!-- My layer content -->
-
</div>
-
-
-
-
<!--Below is the floating layer script-->
-
-
<script type="text/javascript">
-
var ns = (navigator.appName.indexOf("Netscape") != -1);
-
var d = document;
-
var px = document.layers ? "" : "px";
-
function JSFX_FloatDiv(id, sx, sy)
-
{
-
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
-
window[id + "_obj"] = el;
-
if(d.layers)el.style=el;
-
el.cx = el.sx = sx;el.cy = el.sy = sy;
-
el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px; this.style.right=y+px; this.style.bottom=y+px;};
-
el.flt=function()
-
{
-
var pX, pY;
-
pX = ns ? pageXOffset : document.documentElement && document.documentElement.scrollLeft ?
-
document.documentElement.scrollLeft : document.body.scrollLeft;
-
if(this.sx<0)
-
pX += ns ? clientWidth : document.documentElement && document.documentElement.clientWidth ?
-
document.documentElement.clientWidth : document.body.clientWidth;
-
-
pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ?
-
document.documentElement.scrollTop : document.body.scrollTop;
-
if(this.sy<0)
-
pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ?
-
document.documentElement.clientHeight : document.body.clientHeight;
-
this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
-
this.sP(this.cx, this.cy);
-
setTimeout(this.id + "_obj.flt()", 40);
-
}
-
return el;
-
}
-
-
JSFX_FloatDiv("divBottomLeft", 5, -40).flt();
-
-
-
</script>
-
acoder 16,027
Recognized Expert Moderator MVP
Does this link help?
Thanks mate -
I'll attempt to fit that function into my code -
I'm just not so clued in with js. I kind of get the concepts (as my actionscripting is coming along nicely... better anyway)
But I'm not absolutely sure how to make this function slot into my (borrowed) code. ;)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Frobinrobin |
last post by:
I am running Win2k3 Server and when I try to use the mysql_connect
function I am getting an error:
Fatal error: Call to undefined function mysql_connect() in
C:\Inetpub\wwwroot\programs\index.php on line 8
Now, I def know I've configured my php.ini correctly (its literally the
same as my XP machine) and I know that mysql works fine with PHP as I
can run it from the command line :D
I've got the files (tried in multiple places - but...
|
by: TheKeith |
last post by:
Can someone tell me why this isn't working?
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function getcoords() {
document.getElementById("coord-x").value = event.clientX + "";
document.getElementById("coord-y").value = event.clientY + "";
|
by: Linesh Gajera |
last post by:
Hi Guys
i having the same problem with Strongly typed dataset, I have created
a stronsetly typed dataset by draging table from Server explorer and
now i have retreived xml from SQL server 2000 and tried to populate
dataset but it populates 0 rows even though ml contains rows. If i use
regular Dataset instead of Typed dataset, then everything works just
fine..please help me as soon as possible, here is my code snippet.
I think you have...
|
by: Patrick.O.Ige |
last post by:
I have a code below.(It validates against a SQL DB(login page).thats is
giving me an error!
When i try to use :- Session = dr.ToString();
To catch the username so as to redirect the user logged in to another
page....PRINTING
Hello:- John .. for example
It says ERROR:- System.IndexOutOfRangeException: username.Text
What does this mean and how can i correct it
PLS HELP!!
|
by: alisaee |
last post by:
plz check what i have made wrong what is requierd her is to creat class
queue and class stack and run the push,pop operation .
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
class stack
{
public:
| |
by: PeaceLovinHippy |
last post by:
Hello im new to java & im working on some mods for a game - below is a small part which im working on . however im getting errors due to something wrong in the code - can anyone please help me understand what im doing wrong ? (below the following code is also the errors i get) THX in advance
}
static {
Property.set
((class$com$maddox$il2$objects$air$CockpitB29_TGunner == null
?...
|
by: Metallicat |
last post by:
I have been posed and attempted to answer several questions but I do not seem to be getting anywhere. I have emailed my tutor a week ago and he has not responded, If anyone can take a look and help me out I would be grateful.
Two of the questions are below, if anyone can help with these two I'm sure that I can crack the rest!
Find the first name, surnames and address of the patients that have had at least one operation with broken bones. ...
|
by: Andy B |
last post by:
I have a detailsView (replaced the formview with it) thinking it would help
me fix my control access in a formview problem. Well, I don't think .net
knows how to count. Here is what I have:
I am trying to display the value of a certain cell in a label control. Say,
NewsId for my example. In this example, NewsId should be 14. I took this
line and used it to find out how many rows there were:
DateConfirmLabel.Text =...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |