The DisplayCustomPopupPage function would be called from a click event on the page.
The popup page had an InputFormTextBox control on it that was configured for rich text mode.
The line causing this error was in the RTE_ConvertTextAreaToRichEdit function defined in form.js
variables was null, so the problem seemed to be from the following call a few lines above.
Once the modal page loaded, the rich text control did not have the toolbar displayed or provide the expected functionality. If there was more than one InputFormTextBox control on the popup page, subsequent controls would display correctly. It appeared to me that the problem seemed to lie only with the first control. Also, I wasn’t seeing any error in Firefox or IE9, just IE8.
One solution I tried was to call the following script before the page rendered:
The solution I settled on was to call the RTE_GetEditorInstanceVariables function, which was returning a null value the first time it was called – remember that subsequent controls calling this method were getting a valid result.
So, in the OnPreRender method of the modal page’s code behind, I implemented the following:
Hopefully this post will help someone else resolve this error and save them wasting unnecessary time and effort trying to solve it.