473,554 Members | 3,188 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Netscape DHTML not working

OK, I know this issue has been beat to death, but I have tested my
script in Netscape 7.1 and it does seem to be getting the calculated
values it needs to create placement coordinates, and every example I
can find that 'works' in my netscape browser "appears" to use the same
style references to the various div objects that I am trying to use.
Yet even though I have verified the script is stepping through the
doResize subroutine, and the values are valid, nothing on my page gets
moved.

It works just great in IE6 but even with some cross browser
incompatibility , I would still expect that at least 'something' would
be modified in the netscape version but nuttin! What am I missing?
(and yes, I have compared my DOCTYPE definitions to those of
'functional' pages too)

// here's a sample of my js code to resize various div elements on my
page

// retreive an object including cross-browser support
function getObj(name) {
if (document.getEl ementById) {
if(document.get ElementById(nam e)) {
this.obj = document.getEle mentById(name);
}
} else if (document.all) {
if(document.get ElementById(nam e)) {
this.obj = document.all[name];
}
} else if (document.layer s) {
if(document.lay ers[name]) {
this.obj = document.layers[name];
alert(name+" width:"+documen t.layers[name].width);
}
}
return this.obj;
}
// handle dynamic resizing of the various layers making up the page
framework
function doResize() {
// allBodyObj = new getObj('allBody ');
olArcTopObj = new getObj('olArcTo pDiv');
olArcTilObj = new getObj('olArcTi lDiv');
olArcBotObj = new getObj('olArcBo tDiv');

orArcObj = new getObj('orArcDi v');
orArcTopObj = new getObj('orArcTo pDiv');
orArcTilObj = new getObj('orArcTi lDiv');
orArcBotObj = new getObj('orArcBo tDiv');
tlBlueObj = new getObj('tlBlueD iv');
ilArcTopObj = new getObj('ilArcTo pDiv');
ilArcTilObj = new getObj('ilArcTi lDiv');
ilArcBotObj = new getObj('ilArcBo tDiv');
blBlueObj = new getObj('blBlueD iv');

trBlueObj = new getObj('trBlueD iv');
irArcObj = new getObj('irArcDi v');
irArcTopObj = new getObj('irArcTo pDiv');
irArcTilObj = new getObj('irArcTi lDiv');
irArcBotObj = new getObj('irArcBo tDiv');
brBlueObj = new getObj('brBlueD iv');

orightNavObj = new getObj('orightN av');

centContObj = new getObj('centCon t');

var xwid = document.body.c lientWidth;
var yhig = document.body.c lientHeight;

// pad x and y values for testing by border sizes
var padX = ilArcTilObj.off setWidth + irArcTilObj.off setWidth;
var padY = tlBlueObj.offse tHeight + blBlueObj.offse tHeight;

if(xwid < (cM.curX + padX)) { xwid = cM.curX + padX; }
if(yhig < (cM.curY + padY)) { yhig = cM.curY + padY; }

//if(is_nav) {
//} else {
// adjust outer arc X & Y axis
olArcTilObj.sty le.height = yhig - (olArcBotObj.of fsetHeight +
olArcTopObj.off setHeight); // stretch or contract outer left arc
elastic middle on y-axis
olArcBotObj.sty le.top = yhig - (olArcBotObj.of fsetHeight +
tlBlueObj.offse tHeight); // move outer left arc bottom up or down
orArcTilObj.sty le.height = yhig - (orArcBotObj.of fsetHeight +
orArcTopObj.off setHeight + brBlueObj.offse tHeight); // stretch or
contract outer right arc elastic middle on y-axis
orArcBotObj.sty le.top = yhig - (orArcBotObj.of fsetHeight +
brBlueObj.offse tHeight); // move outer right arc bottom up or down
orArcObj.style. left = xwid - orArcObj.offset Width; // move entire
outer right arc left or right

// adjust X-axis values
blBlueObj.style .width = xwid - brBlueObj.offse tWidth; // stretch or
contract bottom left blue box on x-axis
trBlueObj.style .width = xwid - tlBlueObj.offse tWidth; // stretch or
contract top right blue box on x-axis
centContObj.sty le.width = xwid - padX; // adjust width of center
content frame
irArcObj.style. left = xwid - irArcObj.offset Width; // move inner
right arc left or right
brBlueObj.style .left = xwid - brBlueObj.offse tWidth; // move bottom
right blue gradient left or right

// adjust Y-axis values
ilArcTilObj.sty le.height = yhig - (ilArcBotObj.of fsetHeight +
ilArcTopObj.off setHeight); // stretch or contract inner right arc
elastic middle on y-axis
ilArcBotObj.sty le.top = yhig - ilArcBotObj.off setHeight; // move
inner left arc bottom up or down
blBlueObj.style .top = yhig - blBlueObj.offse tHeight; // move
bottom left blue box up or down
centContObj.sty le.height = yhig - padY; // adjust height of center
content frame
irArcTilObj.sty le.height = yhig - (irArcBotObj.of fsetHeight +
irArcTopObj.off setHeight); // stretch or contract inner right arc
elastic middle on y-axis
irArcBotObj.sty le.top = yhig - irArcBotObj.off setHeight; // move
inner right arc bottom up or down
brBlueObj.style .top = yhig - brBlueObj.offse tHeight; // move
bottom right gradient up or down

// outer right nav should be offset from bottom right
orightNavObj.st yle.left = xwid - 220; // move outer right nav bar
left or right
orightNavObj.st yle.top = yhig - 300; // move outer right nav bar up
or down
//}
}
Jul 20 '05 #1
1 2866


Catherine Lynn Smith wrote:
OK, I know this issue has been beat to death, but I have tested my
script in Netscape 7.1 and it does seem to be getting the calculated
values it needs to create placement coordinates, and every example I
can find that 'works' in my netscape browser "appears" to use the same
style references to the various div objects that I am trying to use.
Yet even though I have verified the script is stepping through the
doResize subroutine, and the values are valid, nothing on my page gets
moved.

It works just great in IE6 but even with some cross browser
incompatibility , I would still expect that at least 'something' would
be modified in the netscape version but nuttin! What am I missing?
(and yes, I have compared my DOCTYPE definitions to those of
'functional' pages too)

var xwid = document.body.c lientWidth;
var yhig = document.body.c lientHeight;
While later versions of Netscape implement clientWidth/clientHeight you
should use
window.innerWid th
window.innerHei ght
if you want your script to work with all versions of Netscape 4, 6, 7
olArcTilObj.sty le.height = yhig - (olArcBotObj.of fsetHeight +
olArcTopObj.off setHeight); // stretch or contract outer left arc
elastic middle on y-axis
olArcBotObj.sty le.top = yhig - (olArcBotObj.of fsetHeight +
tlBlueObj.offse tHeight); // move outer left arc bottom up or down


CSS properties like height or left or top need a number plus a unit e.g.
in a stylesheet you use
height: 200px;
left: 10px;
and if you use script you need to do the same so you need to add units
to all those assignments e.g.
olArcTilObj.sty le.height =
yhig - (olArcBotObj.of fsetHeight + olArcTopObj.off setHeight) + 'px';

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

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

Similar topics

6
2144
by: Terry | last post by:
Hi, I hope this problem I ran into has an easy fix. I created a menu bar for my page using Sothink DHTML Menu 4.1 which created javascript file. I also add a small slide show on the page using javascript and the javascript is embedded in this page's HTML. Everything works perfectly with IE. However, Netscape (4, 6, 7) can't see the...
7
2384
by: Ingmund Sjåstad | last post by:
This scipt is working in IE6 but not in Netscape 7. What am I doin wrong? <script language="JavaScript" type="text/JavaScript"> var ns = false; var ie = false; ie = (document.all) ? true : false; ns = (document.layers) ? true : false
6
3076
by: Ingmund Sjåstad | last post by:
Trying to make a dropdown menu. I working nice in IE6 but when I try a link in Netscape 7 nothing happens. Can anybody help me? <html> <head> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>JS</title> </head>
9
2539
by: rez | last post by:
I find it rather frustrating that Netscape 4.x is "no longer supported:" http://help.netscape.com/products/client/communicator/reflib.html Same seems true with IE. How am I ever supposed to make my scripts multi-browser, when they don't bother giving me basic documentation?
7
3676
by: Scott | last post by:
Hello All, I've been reading all of the various issues with Iframes in netscape. I have tried all of the various fixes posted, and have even implemented both an iframe and ilayer. My problem is that no matter which i use, i can access the src before and after i change it, but the page never displays. in IE6 it works no matter how i access...
11
1819
by: Jonny | last post by:
Netscape 7.02 is giving me a headache with a downloaded snow script. Starting with a blank page, I inserted the script and checked it in IE 6 and Netscape 7.02. Everything worked and looked fine. A check on CPU usage (Windows Task Manager>Performance) gave a 0% to 2% reading for both browsers on a Pentium 4, 3.06GHz running XP. As I added...
1
3300
by: Ahmad Noori | last post by:
I have a form and in the form, I have a drop down box. Based on what the user selects, i want to display different input boxes. Here is my drop down box: <td> <select name="reptype" onchange="checkVersion4()"> <option value=""></option> <option value="A">A:</option> <option value="B">B:</option> <option value="C">C:</option>
18
1544
by: Dennis | last post by:
It seems that garbage collection is somewhat flawed in Netscape as the following little script can bring a machine to its knees in about an hour when run on Netstcape 7.1. I've tried freeing the variables manually, but Im not sure whats broken. I assume that the images aren't being freed when they are replaced. Is there a workaround/solution...
2
1691
by: lawrence | last post by:
I thought I was fighting a PHP problem, so I asked about this on a PHP list, but they felt it was a Javascript problem, so I'm reposting a bit of the debate here. Could this Javascript, below, possibly trigger a redirect in Netscape, and send the browser to a file called "0". Cause what is happening is on load, in Netscape, the page redirects...
4
2964
by: Monte Gardner | last post by:
I'm trying to create an effect wherein an HTML page contains a large number of products (up to 125 possibly). Initially, only the first 3 are displayed. When the user clicks on a 'next' or 'previous' button, the currently displayed products dissappear and the next or previous set of 3 appear in the same place. I've got it working in IE...
0
7589
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...
0
7516
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...
0
8029
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...
1
7551
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...
0
6131
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...
1
5428
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...
0
3539
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2012
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
1
1121
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.