The only change to the Applet code was to replace "Hello World" with an SQL string. There is no need to reprint that here as it was given in my previous post on the topic.
In the HTML, I modified the table to display the Applet above the text box, and I widened them both. I also removed the update Applet function, as it was not required for the current exercise. It was then as follows:
<table border=0 align='center' cellpadding=0 cellspacing=0 >
<tr><td style='text-align:center; background-color:#EEEEEE'>Applet</td></tr>
width="500" height="80" MAYSCRIPT style="border-width:0;" name="jsap" id="jsap">
<tr><td><textarea style='width:500px; height:50px' name='txt1' id='txt1'>Query goes here</textarea></td></tr>
It came up initially as shown below:
After clicking the Applet button it was then as shown below:
And to my amazement, I could modify the text (see below) as many times as I liked, and the modified text was transferred across every time.