By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,339 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,339 IT Pros & Developers. It's quick & easy.

Div tag problem in Mozilla

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.