<html>
<head><title>Link-Eingabe</title></head>
<script language="JavaScript" type="text/javascript">
var AppletCtx = null;
// Hier muß der Aufrufer den AppletContext übergeben
function setAppletContext(AppletContext)
{
AppletCtx=AppletContext;
}
// Holt sich den AppletContext vom Aufrufer
function searchAppletContext()
{
AppletCtx= window.opener.getAppletContext();
}
// Holt sich das Protocol vom Aufrufer
function searchProtocol()
{
selectProtocol(window.opener.getProtocol());
}
// Löst die Aktionen aus und schreibt den TExt in das Applet
function doAction(Form)
{
Protocol = Form.elements.protocol.options[Form.elements.protocol.options.selectedIndex].value;
Text = Form.elements[ 'url' ].value;
Head = "<A EXPORT_INFO='keep_link' HREF='"+Protocol+Text+"'>";
if (AppletCtx !=null )
{
AppletCtx.insertText(Head,"</A>");
}
doCancel(Form);
}
// Löscht das Fenster und macht sonst weiter nichts
function doCancel(Form)
{
if (window.opener)
{
window.opener.focus();
}
window.close();
}
function selectProtocol(Protocol)
{
var options = document.forms[0].elements['protocol'].options;
index = options.selectedIndex;
if (Protocol=='') Protocol='http';
for (i=options.length-1;i>=0;i--)
{
opt = options[i];
if (options[i].text.toUpperCase()==Protocol.toUpperCase())
{
index = i;
}
}
options.selectedIndex = index;
}
</script>
<body onLoad="searchAppletContext();searchProtocol();window.focus();" bgcolor="Silver">
<form onSubmit='return false;'>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" style="font-family: sans-serif; font-style: normal; font-variant: normal;">
<tr>
<td colspan=3 align=center valign=middle>
<table>
<tr>
<td>Protocol</td>
<td>
<select name='protocol'>
<option value='mailto:' >MAILTO</option>
<option value='http://' >HTTP</option>
<option value='ftp://' >FTP</option>
<option value='javascript:' >JAVASCRIPT</option>
<option value='file://' >FILE</option>
<option value='gopher://' >GOPHER</option>
<option value='news:' >NEWS</option>
</select></td>
</tr>
<tr>
<td>Adresse</td>
<td><input type='text' size='35' name='url' value=''></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=left><input width='80%' type=button value='Abbrechen' onClick='doCancel(this.form)'></td>
<td align=center><input width='80%' type=reset value='Zurücksetzen' ></td>
<td align=right><input width='80%' type=button value='Übernehmen' onClick='doAction(this.form);'></td>
</tr>
</table>
</form>
</body>
</html>