Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet explorer errors with Web Portal site

Status
Not open for further replies.

kmreid

IS-IT--Management
Oct 31, 2007
3
GB
Hi,

I am developing a Web Portal application. I am testing the UI and it works flawlesly in FF, but does not work in IE.

It is hard to pin down what is wrrong exactly, and I think there may be many problems, but the two symptoms that appear at this stage are:

Microsoft JScript runtime error: Object required.
which happens at this line when one of my data widgets has downloaded data:
_getElement("widget_content_msg_100").style.display = "block";

this error does NOT happen on the initial run of IE, only when the page is refreshed/reloaded.


The next error is:
htmlfile: unknown runtime error
at the line shown below - this is run when I create the widgets:

var remote_container = document.createElement('div');
Sys.UI.DomElement.addCssClass(remote_container, "remote_container");
//remote_container.setAttribute('class', 'remote_container');
remote_container.setAttribute('id', 'remote_container_' + widget.UId);
var iframe_element = document.createElement('iframe');
Sys.UI.DomElement.addCssClass(iframe_element, "remote_iframe");
//iframe_element.setAttribute('class', 'remote_iframe');
iframe_element.setAttribute('id', 'remote_iframe_' + widget.UId);
iframe_element.setAttribute('src', widget.Url + '?date=01/02/2008');
iframe_element.setAttribute('frameborder', '0');
iframe_element.setAttribute('marginwidth', '0');
iframe_element.setAttribute('marginheight', '0');
iframe_element.setAttribute('align', 'left top');
iframe_element.setAttribute('onLoad', 'calcHeight(' + widget.UId + ')');
iframe_element.innerHTML = "An iframe capable browser is required to view this web site."; ///////////////// THIS LINE
remote_container.appendChild(iframe_element);
widget_body.appendChild(remote_container);


Any help apreciated,
Thanks, kmreid
 
_getElement is a function which essentially wraps document.getElementByID for additional checking:

function _getElement(a){
return document.getElementById?document.getElementById(a):null
}

widget_content_msg_100 is the element in the body of the data widget which displays "Loading..." text while the data is being retrieved. The 100 is the unique id for the widget instance (there can be more than one of some types of widget, so they each have both an Id(ie: type) and a Unique Id (ie: instance of type))

I have made a bit of progress today with this. In the second bit of code, I now assign a var to the result of the operation to add the iframe - if this returns null, I set the innerHTML value for the remote_container element, not the iframe. If it returns non-null, i create the iframe element and append it to the remote_container. This now looks much better in IE, but there are some CSS and sizing problems, and drag/drop doesn't work.

Sorry that I didn't post code to explain the above, but I am at home now.


Any further suggestions are welcome,
regards, kmreid
 
But what [!]is[/!] "widget_content_msg_100"? Can you show the code for the HTML node and its attributes?

Is it actually present on the page when the call [to "_getElement"] is made?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top