473,395 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

netscape 4.7: onmouseover not working when i put <a> tag within a div tag

Hi,

I have the following code, and onmouseover/onmouseout etc. does not
work in netscape 4.7.

<div id="divUpControl"><a href="javascript:void(0);"
onMouseOver="PerformScroll(-7);" onMouseOut="CeaseScroll();"
class="nounderline">[up]</a><a href="javascript:void(0);"
onMouseOver="PerformScroll(7);" onMouseOut="CeaseScroll();"
class="nounderline">[down]</a></div>
I have the style for the divs defined using javascript in the <head>
section of the page something like this:

var bAgent = window.navigator.userAgent;
var bAppName = window.navigator.appName;
if ((bAppName.indexOf("Netscape") >= 0) &&
(bAgent.indexOf("Mozilla/4") >= 0) && (bAgent.indexOf("Win") >= 0))
{
document.write ('<style type=text/css>')
document.write ('#divUpControl{position:absolute; width:200;
left:210; top:160; z-index:1; text-align: right}')
document.write ('</style>')

}

Any ideas on why this could be happenning? Code works fine for IE and
NS6 and higher.
Jul 20 '05 #1
7 3948
Lee
Eqbal Z said:

Hi,

I have the following code, and onmouseover/onmouseout etc. does not
work in netscape 4.7.

<div id="divUpControl"><a href="javascript:void(0);"
onMouseOver="PerformScroll(-7);" onMouseOut="CeaseScroll();"
class="nounderline">[up]</a><a href="javascript:void(0);"
onMouseOver="PerformScroll(7);" onMouseOut="CeaseScroll();"
class="nounderline">[down]</a></div>
I have the style for the divs defined using javascript in the <head>
section of the page something like this:

var bAgent = window.navigator.userAgent;
var bAppName = window.navigator.appName;
if ((bAppName.indexOf("Netscape") >= 0) &&
(bAgent.indexOf("Mozilla/4") >= 0) && (bAgent.indexOf("Win") >= 0))
{
document.write ('<style type=text/css>')
document.write ('#divUpControl{position:absolute; width:200;
left:210; top:160; z-index:1; text-align: right}')
document.write ('</style>')

}

Any ideas on why this could be happenning? Code works fine for IE and
NS6 and higher.


In Netscape 4, The contents of an absolutely positioned DIV are
a separate Layer. Your event handlers aren't defined in that
Layer. Try "window.CeaseScroll()".

Jul 20 '05 #2
> In Netscape 4, The contents of an absolutely positioned DIV are
a separate Layer. Your event handlers aren't defined in that
Layer. Try "window.CeaseScroll()".


The methods I am using (PerformScroll, CeaseScroll etc.) are defined
within the script tag in the <head> of the page. I tried
window.PerformScroll() and it did not work. Trouble is, it seems to me
that the mouseover event does not seem to work at all, even if I put
in onmouseover='alert("test");' it does not work. Any more ideas?
Jul 20 '05 #3
Lee
Eqbal Z said:
In Netscape 4, The contents of an absolutely positioned DIV are
a separate Layer. Your event handlers aren't defined in that
Layer. Try "window.CeaseScroll()".


The methods I am using (PerformScroll, CeaseScroll etc.) are defined
within the script tag in the <head> of the page. I tried
window.PerformScroll() and it did not work. Trouble is, it seems to me
that the mouseover event does not seem to work at all, even if I put
in onmouseover='alert("test");' it does not work. Any more ideas?

The following works in Netscape 4 and Netscape 7.
I set the status line, rather than use alerts, because alert()
windows in onmouseover handlers are annoying to work with.

<html>
<head>
<style type=text/css>')
#divUpControl{position:absolute; width:200; left:210; top:160; z-index:1;
text-align: right}
</style>
</head>
<body>
<div id="divUpControl"><a href="javascript:void(0);"
onMouseOver="window.status='up';return true"
onMouseOut="window.status='out';return true"
class="nounderline">[up]</a><a href="javascript:void(0);"
onMouseOver="window.status='down';return true"
onMouseOut="window.status='out';return true"
class="nounderline">[down]</a></div>
</body>
</html>

Jul 20 '05 #4
Lee wrote:

[snip]
The following works in Netscape 4 and Netscape 7.
I set the status line, rather than use alerts, because alert()
windows in onmouseover handlers are annoying to work with.

<html>
<head>
<style type=text/css>')
#divUpControl{position:absolute; width:200; left:210; top:160; z-index:1;
text-align: right}

[snip]

That will break in browsers that follow the CSS specification. The only
reason you have been able to get it to work is because you are putting
Netscape into "quirks mode", where it deliberately screws up rendering to
try and compensate for author errors. It's a much better idea, in my
opinion, to write correct code in the first place. Add a doctype, supply
units to go with your lengths, and validate your code to find other errors:

<URL:http://validator.w3.org/>
--
Jim Dabell

Jul 20 '05 #5
Lee <RE**************@cox.net> wrote in message news:<bi*********@drn.newsguy.com>...
Eqbal Z said:
In Netscape 4, The contents of an absolutely positioned DIV are
a separate Layer. Your event handlers aren't defined in that
Layer. Try "window.CeaseScroll()".


The methods I am using (PerformScroll, CeaseScroll etc.) are defined
within the script tag in the <head> of the page. I tried
window.PerformScroll() and it did not work. Trouble is, it seems to me
that the mouseover event does not seem to work at all, even if I put
in onmouseover='alert("test");' it does not work. Any more ideas?

The following works in Netscape 4 and Netscape 7.
I set the status line, rather than use alerts, because alert()
windows in onmouseover handlers are annoying to work with.

<html>
<head>
<style type=text/css>')
#divUpControl{position:absolute; width:200; left:210; top:160; z-index:1;
text-align: right}
</style>
</head>
<body>
<div id="divUpControl"><a href="javascript:void(0);"
onMouseOver="window.status='up';return true"
onMouseOut="window.status='out';return true"
class="nounderline">[up]</a><a href="javascript:void(0);"
onMouseOver="window.status='down';return true"
onMouseOut="window.status='out';return true"
class="nounderline">[down]</a></div>
</body>
</html>


Its strange. If I cut and paste your code into a file and open in
netscape it works, but in my template for the site it doesn't!!! I am
not sure what I am doing wrong.
Jul 20 '05 #6
Lee
Jim Dabell said:

Lee wrote:

[snip]
The following works in Netscape 4 and Netscape 7.
I set the status line, rather than use alerts, because alert()
windows in onmouseover handlers are annoying to work with.

<html>
<head>
<style type=text/css>')
#divUpControl{position:absolute; width:200; left:210; top:160; z-index:1;
text-align: right}

[snip]

That will break in browsers that follow the CSS specification. The only
reason you have been able to get it to work is because you are putting
Netscape into "quirks mode", where it deliberately screws up rendering to
try and compensate for author errors. It's a much better idea, in my
opinion, to write correct code in the first place. Add a doctype, supply
units to go with your lengths, and validate your code to find other errors:

<URL:http://validator.w3.org/>


You might try reading the thread before responding.
I'm echoing back the OP's code, showing that it doesn't
display the problem he reports.

Jul 20 '05 #7
ez*****@pioneer-usa.com (Eqbal Z) wrote in message news:<3b**************************@posting.google. com>...
Lee <RE**************@cox.net> wrote in message news:<bi*********@drn.newsguy.com>...
Eqbal Z said:

> In Netscape 4, The contents of an absolutely positioned DIV are
> a separate Layer. Your event handlers aren't defined in that
> Layer. Try "window.CeaseScroll()".

The methods I am using (PerformScroll, CeaseScroll etc.) are defined
within the script tag in the <head> of the page. I tried
window.PerformScroll() and it did not work. Trouble is, it seems to me
that the mouseover event does not seem to work at all, even if I put
in onmouseover='alert("test");' it does not work. Any more ideas?

The following works in Netscape 4 and Netscape 7.
I set the status line, rather than use alerts, because alert()
windows in onmouseover handlers are annoying to work with.

<html>
<head>
<style type=text/css>')
#divUpControl{position:absolute; width:200; left:210; top:160; z-index:1;
text-align: right}
</style>
</head>
<body>
<div id="divUpControl"><a href="javascript:void(0);"
onMouseOver="window.status='up';return true"
onMouseOut="window.status='out';return true"
class="nounderline">[up]</a><a href="javascript:void(0);"
onMouseOver="window.status='down';return true"
onMouseOut="window.status='out';return true"
class="nounderline">[down]</a></div>
</body>
</html>


Its strange. If I cut and paste your code into a file and open in
netscape it works, but in my template for the site it doesn't!!! I am
not sure what I am doing wrong.


I noticed that if I put this code outside the <table> tags, it seems
to work, but within a table (<td>) tag it does not. Is there anyway to
make it work there?
Jul 20 '05 #8

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

Similar topics

2
by: Peter David | last post by:
Hi all, 1) I have created a huge XML "data base" consisting of people with <name>Charlie</name> <address>High street></address> etc. I wanna use this xml-data base for various HTM-pages for me...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
1
by: Jeremy Holt | last post by:
I have an Installer Setup project which builds fine. However, if I select Install from within the solution, the installation fails with a message "The installer was interruped before XXXXX could be...
18
by: Tuckers | last post by:
My question is, if I have created my own library which lives in its own install directory, to refer to its header file is it better to use #include "MyLibrary.h" or #include <MyLibrary.h> ...
1
by: JezB | last post by:
I'm binding a DataGrid web-control to data fetched from a database. However some of my data fields contain text that is within <...> characters - I notice that everything between the <> is...
5
by: Ryan Moore | last post by:
I am trying to modify the onMouseOver attribute of a <td> cell created by a DataList... according to ...
4
by: marco | last post by:
Hi ! I have one top frame with link pointed to right frame. When you go with mouse, over some picture in the top frame, i want to display the details of that picture, in the right frame. So,...
11
by: raylopez99 | last post by:
Keep in mind this is my first compiled SQL program Stored Procedure (SP), copied from a book by Frasier Visual C++.NET in Visual Studio 2005 (Chap12). So far, so theory, except for one bug...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.