Strange XForm JavaScript Error



I have a strange XForm edit error where on selecting rows to view the properties of the row/control I get a JavaScript error of "tagName is null or not an object" in xformedit.js. This happens in the function getParentCell on the line where it checks if(topCell.tagName == "TR").

Stepping through the JS reveals that when executing the function fieldProperties the evt value passed in does not contain definitions for attributes srcElement or target (both undefined). It's as though these don't exist or have become corrupted somehow.

This only appears to happen on a specific form, other forms work ok (evt has both srcElement and target).

I have exported and imported the form and the same thing happens and we have not edited any of the JS related to XForms.

Has anyone else encountered this and know what causes the issue and how it might be resolved?



#64185 Dec 12, 2012 12:13
  • fredrik.haglund
    Member since: 2007

    No, I can not say I have seen this. When you export the form you should be able too look at HTML code and compare it with a working form to see if there are any structural differences.

    #64412 Dec 19, 2012 23:28

    Thanks Frederik, I analysed the HTML and one of the fields was named 'event' which I guess was causing JS to get confused. Renaming the field resolved the issue.


    #64584 Jan 03, 2013 11:16