Hi everyone-
I have an asp.net page which uses response.write to add some javascript to a page when it loads.
Basically, I have a page that contains an iframe, and I want to set the source of this iframe to a different page.
I have tried the following:
<script language="javascript"> frames['PageContentFrame'].location.href='newpage.html') </script>
and also:
<script language="javascript"> document.getElementById('PageContentFrame').src='newpage.html'; </script>
But I receive the error "frames.PageContentFrame.location is null or not an object" with either method.
My iframe has id="PageContentFrame" and name="PageContentFrame", and I'm sure they're unique.
Any suggestions?
I have an asp.net page which uses response.write to add some javascript to a page when it loads.
Basically, I have a page that contains an iframe, and I want to set the source of this iframe to a different page.
I have tried the following:
<script language="javascript"> frames['PageContentFrame'].location.href='newpage.html') </script>
and also:
<script language="javascript"> document.getElementById('PageContentFrame').src='newpage.html'; </script>
But I receive the error "frames.PageContentFrame.location is null or not an object" with either method.
My iframe has id="PageContentFrame" and name="PageContentFrame", and I'm sure they're unique.
Any suggestions?