You are here: irt.org | About | Feedback | 313 [ previous next ]
Feedback on:
irt.org FAQ Knowledge Base Q101
Sent by
Derek Wickersham on July 19, 1999 at 10:52:52:
Comments:
<HTML>
<HEAD>
<TITLE>Signed Scripts Testing</TITLE>
<SCRIPT LANGUAGE="JavaScript1.2">
function setFile(str) {
self.blur();
var frame = new java.awt.Frame();
var dlog = new java.awt.FileDialog(frame, "Save As...", java.awt.FileDialog.SAVE);
dlog.show();
var filename = dlog.getDirectory() + dlog.getFile();
netscape.security.PrivilegeManager.enablePrivilege("UniversalFileWrite");
var outputStream = new java.io.FileOutputStream(filename);
var writer = new java.io.BufferedWriter(new java.io.OutputStreamWriter(outputStream));
writer.write(str);
writer.flush();
writer.close();
outputStream.close();
dlog.dispose();
netscape.security.PrivilegeManager.disablePrivilege("UniversalFileWrite");
}
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<TEXTAREA NAME="input" COLS=20 ROWS=10 WRAP="virtual"></TEXTAREA><BR>
<INPUT TYPE="button" VALUE="Save File" onClick="setFile(this.form.input.value);"><P>
</FORM>
</BODY>
</HTML>
Other feedback on 'irt.org FAQ Knowledge Base Q101' - show all