Try our conversational search powered by Generative AI!

Strange XForm JavaScript Error

Vote:
 

Hello,

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?

Thanks,

Mark

#64185
Dec 12, 2012 12:13
Vote:
 

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
Vote:
 

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.

Mark

#64584
Jan 03, 2013 11:16
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.