I am trying to develop some script to open files for use in a particular plugin
called Chime which is used for molecular visualization. I am just experimenting
right now. The whole script works just fine in Iexplore. In Netscape 4.7
invoking of the plugin works where the writenln statements are immediately
executed outside of the function but the function selectFile() does not work
in Netscapre. (The plugin does not work in the new Netscapes.)
--------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
var pdbFile = "file:///C:/My Documents/JavaSTest/mmol1.pdb";
document.writeln( pdbFile );
document.writeln( '<br>' );
document.writeln('<embed name="mmol" width=284 height=259 startspin=False
spiny=20 ')
document.writeln(' src="' + pdbFile + '" ')
document.writeln('type=application/x-spt script="wireframe 25; ')
document.writeln('spacefill 85; zoom 150" color2d=black bgcolor2d=black >
</embed>');
function selectFile() {
var pdbFile = 'file:///' + document.form1.fileN.value;
document.writeln( pdbFile );
document.writeln( '<br>' );
document.writeln('<embed name="mmol" width=284 height=259 startspin=False
spiny=20 ')
document.writeln(' src="' + pdbFile + '" ')
document.writeln('type=application/x-spt script="wireframe 25; ')
document.writeln('spacefill 85; zoom 150" color2d=black bgcolor2d=black >
</embed>');
}
</script>
</head>
<body>
<form name=form1>
<input type=file name="fileN">
<input type=button onClick="selectFile()" value="Open File">
</form>
--------------------------------------------------
Any ideas?
Thanks,
Jeff