HTMLViewer in a web app?

I know this question is a bit warped… but…

With a desktop application I can drag a HTMLViewer onto my application window.
I can set up java script and html for it to render.

I have a java script and some html I want to render in a container on my web page.
Do I simply sub class a web container?
How do i set the html source and java script for this control?

HTML Viewer on Web is an iFrame.
If you’re trying to implement your own control with HTML, CSS, and JavaScript you need to look in the WebSDK folder inside Extras installed with Xojo.

Maybe I’m wrong it just seems WebSDK is overly complex for this…
I’ll look at iFrame.

Looking at the WebSDK where there is an example called HTMLArea! Cool.
I have java script class I want to add to this example and call it.

Hello Brian,

in ref to your first question…

  1. Drag and position a WebHTMLViewer control

  2. In the Open or Shown event

Dim tHtml As String = "<html><script>[insert js]</script><body>some content</body></html>" // your webpage source Me.LoadPage(tHtml) // or if you have a destination page in mind use Me.ShowURL("", True) or similar.

Kind regards, Andrew

If I have a few java script methods do I place them in the html or do I use execute java script?

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Fetch Binary data and Parse File</title>
    <script type="text/javascript" src="fetchbinary.js"></script>
  <style> body { background: #aaa; } </style>
    <p>Stuff ...</p>
	<table border="2">
			<img id="target" src="" width="512">
	<script type="text/javascript"><!--
		var my_gif = loadTestFile();

loadTestFile is a java script method in a file called fetchbinary.js.
I believe I can put the source directly in the html or maybe I can use execute java script?
I’m a little confused because unless the javascript is know by the time document.getElementByID is seen by the browser it may be too late.