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

1

1 Answer 1

6

Yes:

MyFrame.contentWindow.document.write("<html><head></head><body>This is additional help that was built dynamically on the fly</body></html>");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.