2

I have the following line of code in my JavaScript program

MyFrame.src = mainPath + "/resources/help.htm";

This is the default but in some cases I would like to load the contents of this iFrame with a string that I build dynamically, such as:

"<html><head></head><body>This is additional help that was built dynamically on the fly</body></html>"

Is there a way to do this?

Thanks

Ann Sanderson
  • 201
  • 1
  • 8
  • 13

1 Answers1

6

Yes:

MyFrame.contentWindow.document.write("<html><head></head><body>This is additional help that was built dynamically on the fly</body></html>");
Igor
  • 15,833
  • 1
  • 27
  • 32