473,786 Members | 2,571 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 2882


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
2153
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 menu bar created in DHTML when the slideshow javascript is
7
2405
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
3097
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
2555
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
3691
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 it. here is the code that is changing it: function InternalNav(sPage) {
11
1856
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 text, images, tiled background and so on. I noticed the mouse was becoming jerky in Netscape 7....
1
3318
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
1562
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 to this? I've read some old postings about this in 4.x browsers, but I never saw a solution, and...
2
1705
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 to something like: http://www.myDomain.com/0
4
2975
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 6.0. It's mostly working in Netscape 7.2. The only problem in NS 7.2 is that each time you click on...
0
9497
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,...
0
10164
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...
1
10110
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,...
0
9962
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
8992
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
7515
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
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
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...
1
4067
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 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.