# Firefox - object has no properties

**URL:** <https://forum.kirupa.com/t/firefox-object-has-no-properties/194865>\
**Category:** web dev\
**Created:** [July 26, 2006, 8:15pm UTC](https://forum.kirupa.com/t/firefox-object-has-no-properties/194865 "2006-07-26T20:15:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lwenkel](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@lwenkel](https://forum.kirupa.com/u/lwenkel)\
**Post date:** [July 26, 2006, 8:15pm UTC](https://forum.kirupa.com/t/firefox-object-has-no-properties/194865/1 "2006-07-26T20:15:05Z")

</div>

This code gives an error "imgObj.parentNode.id has no properties:

(code)

function setSelectedElem(evt) {  
var imgObj = (evt.imgObj) ? evt.imgObj : evt.srcElement;  
// var imgObj = (evt.imgObj) ? evt.target : evt.imgObj;  
var imgObj = evt.target  
// alert("evt.imgObj = " + evt.imgObj + “.”);  
alert("imgObj = " + imgObj + “.”);  
if ( **imgObj.parentNode.id**.indexOf(“dragimg”) != -1) {  
selectedObj = imgObj.parentNode.style;  
setZIndex(selectedObj,100);  
return;  
}  
selectedObj = null;  
return;  
}

(/code)

The commented out lines were part of the original IE focused code. The alerts were my attempt to determine if the variables had values (they did). This is part of a Firefox acceptable recode of the IE code that products the results demonstrated here: [http://www.sacu.com/locations/locate.asp](http://www.sacu.com/locations/locate.asp)

Thanks in advance for your help.
