Sample code

<script language="JavaScript">
<!-- Comment for non-JavaScript browsers.

targetwin = window.open( "", "IBM3270Applet", "status=yes, width=650, height=550" );
targetdoc = targetwin.document;

// Use the "with (object)" statement to simplify the following lines.
with ( targetdoc ) {
    writeln( '<html>' );
    writeln( '<body>' );
    writeln( '' );
    writeln( '<h1>Reflection for IBM 3270</h1>' );
    writeln( '<applet mayscript name="IBM3270"' );
    writeln( '        code="com.wrq.rweb.Launcher.class"' );
    writeln( '        codebase="./ex/"' );
    writeln( '        width="600" height="400"' );
    writeln( '        archive="Launcher.jar">' );
    writeln( '    <param name="hostURL" value="tn3270://myHost:23">' );
    writeln( '    <param name="autoconnect" value="true">' );
    writeln( '    <param name="shortcutMenu" value="true">' );
    writeln( '    <param name="frame" value="false">' );
    writeln( '    <param name="launcher.sessions" value="IBM3270">' );
    writeln( '</applet>' );
    writeln( '' );
    writeln( '<form>' );
    writeln( '    <input type="button"  ');
    writeln( '           name="Close" ' );
    writeln( '           value="Close Window" ' );
    writeln( '           onClick="window.close()"> ');
    writeln( '</form>' );
    writeln( '' );
    writeln( '</body>' );
    writeln( '</html>' );
    close();     
}

// End of comment -->
</script>