944,043 Members | Top Members by Rank

Ad:
Feb 1st, 2007
0

Reference to undefined property FIREFOX

Expand Post »
can anyone pls help me why FIREFOX displays 'reference to undefined property' message for this html page? It works fine in IE.

[code]
<html>
<head>
<title>Expandible row test in firefox</title>
<STYLE type="text/css">
.collapsed
{
DISPLAY: none;
}
</STYLE>
<script language="javascript" type="text/javascript">
//***collapsible rows
function outliner(evt) {
evt = (evt) ? evt : (window.event) ? window.event : "";
var oMe;
if (evt.srcElement) {
oMe = evt.srcElement;
} else if (evt.target) {
oMe = evt.target;
}
if (evt.srcElement) {
//for IE
var child = document.all[oMe.getAttribute("child",false)];
}
else {
//for Firefox
var child = document.getElementById[oMe.getAttribute("child",false)];
}
//get child element
//if child element exists, expand or collapse it.
if (null != child)
child.className = child.className == "collapsed" ? "expanded" : "collapsed";
}
function changepic(evt) {
evt = (evt) ? evt : (window.event) ? window.event : "";
var uMe;
if (evt.srcElement) {
uMe = evt.srcElement;
} else if (evt.target) {
uMe = evt.target;
}
var check = uMe.src.toLowerCase();
if (check.lastIndexOf("expand.gif") != -1)
{
uMe.src = "collapse.gif";
}
else
{
uMe.src = "expand.gif";
}
}
</script>
</head>
<body onclick="outliner(event)">
<table cellpadding="2" cellspacing="0" width="98%" class="infotable" bgcolor="#f4f4f4">
<caption class="issuetitle">NARMC Sleep Disorders Clinic Intake Form</caption>
<thead >
<tr>
<th class="header" width="1%" />
<td class="header"> Last Name:</td>
<td class="header"> First Name:</td>
<td class="header"> Gender:</td>
</tr>
</thead>

<tr>
<td class="content"><A HREF="javascript:" onClick="document.getElementById['srcidDBData115847296']"><IMG border="0" alt="expand/collapse" class="expandable" height="11" onclick="changepic(event)" src="expand.gif" width="9" child="srcidDBData115847296" ></A></td>
<td class="content">Caloris</td>
<td class="content">Morris</td>
<td class="content">M</td>
</tr>

<tr class="collapsed" bgcolor="#ffffff" id="srcidDBData115847296">
<td colspan="4"> Test
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</code]
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sendkamal is offline Offline
5 posts
since Jan 2007
Feb 16th, 2007
0

Re: Reference to undefined property FIREFOX

Capitalizing DISPLAY is the problem. CSS is case-sensitive, and display is a lowercase property.

IE is the one messing up, because it is treating it as case-insensitive.

All of your tags and properties should be lowercase.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: new window? target="_blank" ?
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: javascript works in IE but not working in firefox





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC