Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
102
rated 0 times [  103] [ 1]  / answers: 1 / hits: 16351  / 16 Years ago, tue, february 17, 2009, 12:00:00

The following works in IE, but not Firefox:



var el = $get('divToMask');
var box = Sys.UI.DomElement.getBounds(el);

var maskEl = $get('maskDiv');

// Only seems to work in IE
maskEl.style.width = box.width;
maskEl.style.height = box.height;

Sys.UI.DomElement.setLocation(maskEl, box.x, box.y);


box.width and box.height contain the correct values, but Firefox ignores the maskEl.style .width/.height methods.


More From » asp.net

 Answers
5

Note: I'm not familiar with the Javascript helper library you are using.



I'd guess that you need to change the two lines after your comment to the following:



maskEl.style.width = box.width + px;
maskEl.style.height = box.height + px;

[#99964] Monday, February 9, 2009, 16 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
marisela

Total Points: 103
Total Questions: 105
Total Answers: 102

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
;