The application is running on a windows server 2003 box using asp.net 2.0 and is an IE specific web app. There is a button that opens a form in an iframe using showModalDialog(...) from a function call located in the JavaScript.
Here is an example of the function:
function ShowBusinessHoursSubForm( source )
{
var retval = window.showModalDialog("htm/" + locLocaleID + "/SubFormHostFrame.htm", source, "dialogWidth:265px;dialogHeight:261px;help:no;scroll:no;status:no;");
}
The host frame is loading an aspx page which contains the actual form that is being used. On the form that is opened there is a button that, when clicked, submits changed to the form. However, if no changed were made before the form was submitted, another modal window pops up stating that there were no changed to the form. This modal window is opened through registration of some JavaScript in the button click event. The code is as follows (C#):
string l_S_ErrorScript = "<script type='text/javascript' language='javascript'>window.showModalDialog('htm/" + l_S_Culture + "/NotChangedErrorDialog.htm', '../../" + l_S_SkinPath + "', 'dialogWidth:310px;dialogHeight:145px;scroll:no;help:no;status:no;');</script>";
if(!m_Page.ClientScript.IsStartupScriptRegistered("ErrorScript"))
{
m_Page.ClientScript.RegisterStartupScript(this.GetType(), "ErrorScript", l_S_ErrorScript);
}
When the button is clicked and this dialog needs to appear the following JavaScript error appears:
Error: Object doesn't support this property or method
The weird thing is, if I access the application locally and try it everything works fine, but accessing from another computer causes the error. Also, depending on what server (we have many servers for testing all with windows server 2003) the error may not occur on another computer either. These computers are running the same software version using the same version of IE with the same settings. I'm inclined to believe that there is some configuration issue somewhere, but with the settings being the same it is hard to tell. I cannot really change how the app works or the technologies used either.
Anyone have any ideas as to what may be causing this?
The issue was with the popup blocker in IE on the client machine. Since the modal window was being opened in another modal window, the popup blocker did not consider it part of the parent and thinks it should block it. After adding the site to the popup blocker everything worked.
How ridiculous!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With