Javascript error: Object doesn't support this property or method

Stimulsoft Reports.WEB discussion
Post Reply
fuhrj
Posts: 120
Joined: Wed Jun 11, 2008 12:51 pm
Location: Lancaster, Ohio

Javascript error: Object doesn't support this property or method

Post by fuhrj »

Using Build 10.20 and Internet Explorer 8.

When a report is loaded into the Webviewer and the report contains form parameters, I get this error:

Line 574:
Error: Object doesn't support this property or method

If I debug the message, IE is complaining about this line from the Javascript function below:

webViewer = document.getElementById(webViewerId);


Full javascript:

function HideLoadMessage(webViewerId)
{
reportFrame = document.getElementById("webReportFrame_" + webViewerId);
loadMessage = document.getElementById("webLoadMessage_" + webViewerId);
reportTable = reportFrame.contentWindow.document.getElementById("webReportTable_" + webViewerId);
scrollFrame = reportFrame.contentWindow.document.getElementById("webScrollFrame_" + webViewerId);

heightDelta = 40;
if (scrollFrame != null) heightDelta = 0;
if (reportTable != null)
{
reportFrame.width = reportTable.offsetWidth;
reportFrame.height = reportTable.offsetHeight - heightDelta;
}
loadMessage.style.visibility = "hidden";

// debugger;
if (scrollFrame == null)
{
webViewer = document.getElementById(webViewerId);
webViewer.style.width = reportTable.offsetWidth + "px";
webViewer.style.height = reportTable.offsetHeight + "px";
}
}

The report runs, but I need to fix the Javascript error from showing every time the report is loaded into the Webviewer.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Javascript error: Object doesn't support this property or method

Post by Vladimir »

Hello,

We could not reproduce this error. Please tell us the property values for WebViewer, also, please send us your report to support[at]stimulsoft.com.

Thank you.
fofo
Posts: 1
Joined: Mon Nov 08, 2010 9:15 pm

Javascript error: Object doesn't support this property or method

Post by fofo »

Hello,

We could not reproduce this error. Please tell us the property values for WebViewer, also, please send us your report to moncler ski pants
Thank you.
Oaktree
Posts: 25
Joined: Wed Apr 28, 2010 8:53 am

Javascript error: Object doesn't support this property or method

Post by Oaktree »

I know this is a bump to an old topic, but it is still relevant today so my apologies. This topic just happens to contain the keywords that most people are looking for when trying to figure out what is happening.

This error occurs as a result of the viewer using the same page in a manner similar to an ashx page to load images for the viewer.

The parameters your page is looking for do not exist on the version of the page that is loaded when the image lookup is performed.

To give you an example...

You load a url like this:

myReportViewerPage.aspx?reportID=6&something=73

The Viewer loads the first pass using your parameters. Then it does another *partial* load for each image like this:

myReportViewerPage.aspx (can't remember if there is a parameter tacked on here, but the variables above are missing)

The error occurs when your page's logic tries to process the viewer setup but can't find the parameters it needs to do so. I resolved the issue on my page by checking for one of my parameters. If the parameter doesn't exist, then I know the Viewer is loading images, and I don't perform any of my logic.

Hope that helps
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Javascript error: Object doesn't support this property or method

Post by Vladimir »

Hello,

Thanks for the detailed description of the problem.

Thank you.
Post Reply