R
Russell
I have a quirky issue that I believe involves timing and only 2 hairs left to pull.
I have a modal dialog that is an IFrame.
The IFrame contains another window - which contains the appropriate title.
I am trying to change the title of the IFrame window to be
that of the contained window title.
If I uncomment the alert statement below - the title change works.
Comment out the alert - and - no title change.
I have unsuccessfully tried using the following
methods/events as timing devices:
setTimeout, onload, onreadystatechange
The problem appears to be that I have to make the title change
before the modal window is displayed - which I cannot seem to capture.
ANY assistance is greatly appreciated...
Start of code sample:
....
<body>
<iframe id="content"
name="embeddedContent"
src="<%= request.getParameter("url")%>"
frameborder="0"
height="100%"
width="100%">
</iframe>
</body>
<script language="javascript">
var myIframe = document.getElementById("content");
if (myIframe)
{
if(myIframe.contentWindow)
{
//alert("stop now");
if(myIframe.contentWindow.document)
{
document.title = myIframe.contentWindow.document.title;
}
}
}
</script>
....
End of code sample
Thanks!
I have a modal dialog that is an IFrame.
The IFrame contains another window - which contains the appropriate title.
I am trying to change the title of the IFrame window to be
that of the contained window title.
If I uncomment the alert statement below - the title change works.
Comment out the alert - and - no title change.
I have unsuccessfully tried using the following
methods/events as timing devices:
setTimeout, onload, onreadystatechange
The problem appears to be that I have to make the title change
before the modal window is displayed - which I cannot seem to capture.
ANY assistance is greatly appreciated...
Start of code sample:
....
<body>
<iframe id="content"
name="embeddedContent"
src="<%= request.getParameter("url")%>"
frameborder="0"
height="100%"
width="100%">
</iframe>
</body>
<script language="javascript">
var myIframe = document.getElementById("content");
if (myIframe)
{
if(myIframe.contentWindow)
{
//alert("stop now");
if(myIframe.contentWindow.document)
{
document.title = myIframe.contentWindow.document.title;
}
}
}
</script>
....
End of code sample
Thanks!