Closed Bug 279714 Opened 20 years ago Closed 20 years ago

javascript error for parsing value for property 'height'. Declaration dropped.

Categories

(Toolkit Graveyard :: Error Console, defect)

x86
Windows XP
defect
Not set
trivial

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: jab_creations, Assigned: bugs)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050101 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050101 Firefox/1.0+

When you go to my site with Firefox the javascript console gives me errors like...

Error for parsing value for property 'height'. Declaration dropped.

The same for width.

The script is intended to create the white div that makes the site scroll like
an iframe (or whatever color it is according to the theme you pick).

It is rendered fine in all browsers (that I've tried my site on) but I am
curious if IE is being lax and I didn't define something the right way OR if
everything is fine but the console is buggy.

Reproducible: Always

Steps to Reproduce:
__________________________________

Here is the javascript code...
__________________________________

<script type="text/javascript">
<!--
function resizeDiv() {
width = document.body.clientWidth-20;

if ((navigator.userAgent.indexOf("Opera 6")!=-1)
||(navigator.userAgent.indexOf("Opera/6")!=-1))
 { 
 height = document.body.clientHeight-20;
 }
 else if (navigator.userAgent.indexOf("Opera")!=-1)
 { 
 height = document.body.clientHeight-40;
 }
 else
 { 
 height = document.body.clientHeight-20;
 }

document.getElementById('DivBody').style.width = width;
document.getElementById('DivBody').style.height = height; }
document.writeln('<div id="DivBody" class="body">')
resizeDiv();
//-->

</script>


Expected Results:  
Not sure, is my script fine or not?  Still learning this stuff! :-D

No other comments, but if you want to make a suggestion for colors for my site's
firefox theme I'd be happy to take some notes :-)
there is no such thing as clientHeight and clientWidth in fx (the wc3) standard.
I believe that a MSIE invention.

this is a junk bug.
note to reporter: please do research before posting bugs :)
If you want to ask about the correctness of your JS code, please use one of the
various web forums or newsgroups for this. This is a database for *real* bugs of
the firefox application, not your personal support forum.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
v
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.