26. dubna 2011 20:34
In a nutshell, when a Drop-Down List Box control is used to set a condition to expose a hidden section, I get a js error in core.js. I have various other controls on the form that expose other hidden sections. This control seems to be the only one that causes the error. Obviously, the remaining hidden sections in the form fail after the error.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; MS-RTC LM 8; InfoPath.3)
Timestamp: Tue, 26 Apr 2011 19:53:49 UTC
Message: Object required
The form was originally developed in 2007 and published in the 2010 environment. Once I discovered the error I created the same form from scratch in InfoPath 2010 and republished the form reproducing the same error.
This is a managed form with full trust. The code in the form is used to save the form from the library in which it was opened from.
27. dubna 2011 2:02
When you built the same form from scratch, did it also have the same code? If you do the same form without any code, what happens?
Btw, the ability to save from the library from which it's opened is built-in and automatic. Did you mean "submit" back to the same form library? That's a different operation, so I just want to be clear.
SharePoint Architect || Microsoft MVP || My Blog
Planet Technologies || SharePoint Task Force
27. dubna 2011 15:01
Whoops sorry, yes. Submits back to the library from where it was opened. And yes, the second form had the same code. I've just removed the code and republished with the same result. Something interesting, all of the text fields are read only after the js error.
-- Update --
I have just confirmed this is an issue in another form in the site. It is published from the client - no code.
23. srpna 2012 18:57
I think I found a fix for this. Just started having the same issue with a form that has been unchanged and working fine. Something must have changed on the back end with SharePoint, I just dont know what because I am not an admin.
Anyways, to fix this, I went into properties of the Drop-Down List Box and set the Postback Settings to 'Always' - it was originally set to Only when necessary. Now I am not getting the IE script error anymore.
You can also "fix" this by enabling the 'Show InfoPath commands in Ribbon or toolbar' in Form Options. I have this option disabled because I dont like the ribbon. When the ribbon is disabled I get the error when I turn it on the error goes away.
Its still weird and I want to know what is causing it. This only happens when you have a drop down list box, a section, a rich text box within that section, the command ribbon for web browser disabled in InfoPath and the section has to be hidden on form load then a rule has to unhide it based on a selection from the drop down list box.
Also, the script error does not occur with Chrome or Firefox. Only IE (ver 8 in my case)
Finally, this only happens when you use a drop down list to unhide a section. I tried with option buttons and checkboxes and do not get that error.
5. října 2012 2:56
Thank you for that information. I am trying these now...
I did open a case with MS last year and as I understand it, the new core.js did not make it into the April CU. I also understand that MS has a version available somewhere with the fix. I am tracking that down too..
Thanks for the response.