(images and text) of a display frame - all files and images are client
side. [Does that make this a "widgit"?]. When I try to write to the
display frame from the control frame I get the error message:
"window.parent.pictureFrame has no properties" and all content of the
display frame disappears. My plan was to populate the DOM image object
for the display frame with the URIs for the graphics (a variable
number). Apparently I don't understand the DOM naming convention as
nothing I have tried (in desparation), works. Even
document.getElementById didn't work.
window.testFrameset.pictureFrame
window.parent.pictureFrame
window.document.testFrameset.pictureFrame
How do I access the pictureFrame to write and display HTML code to it?
How do I access the pictureFrame image object to set the anchor URIs?
How would this change if I were to write the frame from the main (frameset) page?
Expand|Select|Wrap|Line Numbers
- -------- Frameset page extract -------------
- <frameset rows="100,*" frameborder="0" border="0" name="testFrameset">
- <frame src="TestControl.htm" name="controlFrame">
- <frame src="TestPictures.htm" name="pictureFrame">
- </frameset>
- -------- TestControl page extract -------------
- <BODY name="controlBody">
- <h3>Control Frame</h3>
- <script language="JavaScript"> // None of these work
- // Each tried separately
- alert(document.getElementById("pic01")) // Displays "Null"
- var imagename0 = document.testFrameset.pictureFrame.image[0].src
- // error msg = document.testFrameset has no properties
- document.write(imagename0 + "<br>")
- window.parent.pictureFrame.image[0].src = db01.gif
- //error msg = window.parent.pictureFrame has no properties
- </script>
- </BODY>
- -------- TestPictures page extract -------------
- <BODY name="picframeBody">
- <h3>Picture Frame</h3>
- <img src="ga01.gif" ID="pic01"</A>
- <img src="ga02.gif" ID="pic02"</A>
- <img src="ga03.gif" ID="pic03"</A>
- </BODY>
Namaste', Art
If at first you DO succeed, try not to look astonished!
PS - I misspelled my login name. How do I change it or unsubscribe & re-signup?