Log in

View Full Version : IFrame reference



t0ny
06-28-2005, 01:16 PM
Hi there,

I have a page that needs to call a function within an IFrame straight away, and it is simply saying that the object does not support this property or method.

I think the problem is that the IFrame has not rendered when the call from the parent is made. I have tried adding it to the IFrames onload event but with no success?

here is the calling line.. (vsMsgBox is just the name of the form)

<%=vsMsgBox%>.document.onload = showMessage(1,'<%=vsMsgBoxTitle%>','<%=vsMsgBoxText%>',<%=viOkOnly%>);

Thanks for any help or sugestions...

t0ny
06-28-2005, 01:41 PM
Well as usual whenever i get so stuck i post then come up with an answer straight away!!

I would appriciate any better methods if anyone has any...


I forced the Iframe to always make a call to a parent function once it has loaded. I generate this function dynamically so most of the time the function is empty.

Works fine, any reasons not to do this?