473,387 Members | 1,597 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,387 software developers and data experts.

Div tag problem in Mozilla

Hai All,

In my ASP.NET application, I have created a popup window using a
mouseover event for Label.I have placed all popup controls inside a div
tag.This popup working well in IE,but not working in mozilla.. How to
solve this div tag problem?? How to show the Popup ib Mozilla?

My code look like this :
=================

<div class="PopUptransparent" id="PopUp">
<table class="PopUpMainTable" id="PopupTable" cellSpacing="0"
cellPadding="0" width="238"
border="0">
<tr>
<td class="PopupBoldTxtBlack" id="lblRemaining" style="PADDING-LEFT:
3px; PADDING-BOTTOM: 7px; PADDING-TOP: 7px; BORDER-BOTTOM: #99ccff 1px
solid"
width="40%"></td>
<td class="PopupBoldTxtRed" id="lblRemainingVal"
style="PADDING-RIGHT: 5px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px;
BORDER-BOTTOM: #99ccff 1px solid"
width="60%"></td>
</tr>
..
..
..
..
..
</table>
</div>

function ShowAuctionDetailPopUp(RemainingName)
{
var X;
var Y;

document.getElementById('lblRemaining').innerText= RemainingName;
document.getElementById('lblRemainingVal').innerTe xt=RemainingVal;
var pos = getElementPos(CtrlId);
X= pos.x;
Y= window.event.clientY+document.body.scrollTop+8;
PopUp.style.left = X;
PopUp.style.top = Y;

PopUp.style.display='block';
PopUp.style.position= 'absolute';
PopUp.style.left = X;
PopUp.style.top = Y;
}
function getElementPos(sElementID)
{
if(!document.getElementById) return null;
var e = document.getElementById(sElementID);
if(e == null ) return null;
var p = { x: 0, y: 0};
while(e)
{
p.x += parseInt(e.offsetLeft,10);
p.y += parseInt(e.offsetTop,10);
e = e.offsetParent;
}
return p;
}

Jul 12 '06 #1
4 4410
co*******@gmail.com wrote:
<snip>
<div class="PopUptransparent" id="PopUp">
<snip>
Y= window.event.clientY+document.body.scrollTop+8;
Mozilla/Gecko browsers do not have a global event object, they pass an
event object as an argument ot the event handler instead).
PopUp.style.left = X;
<snip>

Treating the ID attribute of an element as the name of a global variable
that refers to the element is taking advantage of a non-standard
approach implemented by Microsoft in IE but mostly not in Mozilla/Gecko
browsers.

Non-zero style values are required to include a specification of the
unit being used. Some browser interpret values assigned without units as
values with pixel units, but this type of error-correction is not
universally implemented (or in any way required).

Richard.
Jul 12 '06 #2
co*******@gmail.com wrote:
[...]
document.getElementById('lblRemaining').innerText= RemainingName;
innerText is a proprietary IE property that is not supported by many
other browsers. The W3C equivalent is textContent. Search for
cross-browser solutions in the archives.

<URL:http://groups.google.com.au/group/comp.lang.javascript/search?q=innertext+textContent+robg&start=0&scorin g=d&>

[...]

--
Rob
Jul 12 '06 #3
Dear Richard,

Thnx for ur reply.. Can u explain bit elabrotaly ?? How to
solve this prob?? Plz give some code snips ...
Richard Cornford skrev:
co*******@gmail.com wrote:
<snip>
<div class="PopUptransparent" id="PopUp">
<snip>
Y= window.event.clientY+document.body.scrollTop+8;

Mozilla/Gecko browsers do not have a global event object, they pass an
event object as an argument ot the event handler instead).
PopUp.style.left = X;
<snip>

Treating the ID attribute of an element as the name of a global variable
that refers to the element is taking advantage of a non-standard
approach implemented by Microsoft in IE but mostly not in Mozilla/Gecko
browsers.

Non-zero style values are required to include a specification of the
unit being used. Some browser interpret values assigned without units as
values with pixel units, but this type of error-correction is not
universally implemented (or in any way required).

Richard.
Jul 12 '06 #4
co*******@gmail.com wrote:
Dear Richard,

Thnx for ur reply.. Can u explain bit elabrotaly ?? How to
solve this prob?? Plz give some code snips ...
Can you ask that question in the normal semantic and syntactic units of
a human language (for practical reasons maybe one I would understand)?
Richard Cornford skrev:
<snip- top post>

And formatted as a normal Usenet post?

Richard.

Jul 12 '06 #5

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

Similar topics

0
by: Neil Zanella | last post by:
Hello, I just ran into an interesting problem with cookies while using PHP 4 and Mozilla 1.6. Basically, I have been using PHP on a site called: foo.bar.net?script.php Within that script I...
4
by: Jakub Fast | last post by:
Hi, Does anybody know how far you can get nowadays with trying to use Python as the script language for XUL instead of JS? Is it possible (even theoretically) to write full-fledged applications...
0
by: melledge | last post by:
Mozilla Foundation Co-Hosts Europe's Leading XML and Web Developer Conference XTech 2005 Conference to Bring Together XML and Web Technology Thought Leaders
2
by: Peter | last post by:
Hello, First of all, sorry for all the code. I don't know how to explain my problem without it. I have a javascript function which can build a webpage dynamically. A striped down version of...
15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
3
by: Jim Ley | last post by:
Hi, It seems the mozilla guys have chosen another (almost certainly poor choice in my initial thoughts) of having document.all evaluate to false, but document.all catch the chicken event - also...
10
by: News | last post by:
I have a page up trying to learn how to ID a browser and other info. http://wyght.com/warren/testPos.html here is the code <script type = "text/javascript"> var space = ", "; var name...
20
by: Thorsten Kampe | last post by:
Hi, I've already sent this to the Komodo mailing list (which seemed to me the more appropriate place) but unfortunately I got no response. I'd like to build a Python GUI app. Neither Tkinter...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.