473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Plugin invoking works in IE but not Netscape

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
Jul 20 '05 #1
2 1241
"JeffFinnan" <je********@aol.com> wrote in message
news:20***************************@mb-m16.aol.com...
<snip>
<input type=button onClick="selectFile()" value="Open File">

<snip>

As you are using document.writeln after the current page has loaded you
will probably need to call - document.close() - after the write to let
the browser know that you don't intend adding any more to the document.
It has also proved more reliable to accumulate the HTML you intent to
write in an array or string (local to the function) and write it out in
one operation instead of many (or to use multiple parameters on the
writeln call).

Richard.
Jul 20 '05 #2
>"JeffFinnan" <je********@aol.com> wrote in message
news:20***************************@mb-m16.aol.com...
<snip>
<input type=button onClick="selectFile()" value="Open File">

<snip>

As you are using document.writeln after the current page has loaded you
will probably need to call - document.close() - after the write to let
the browser know that you don't intend adding any more to the document.
It has also proved more reliable to accumulate the HTML you intent to
write in an array or string (local to the function) and write it out in
one operation instead of many (or to use multiple parameters on the
writeln call).


=================
Richard,

The document.close() did the trick. Thanks.

I will have to learn how one does the array. I did have it as one line but
found I could break it.

Thanks again,
Jeff

PS. Now I want to figure out how to get the function to bring up the form each
time I load a new file.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Zapp | last post by:
Hello all! I need to do detect the IPXI move player plugin in IE. I know you have to look for the Active X object, Netscape you just loop through and it will print out the plugins. Can anyone...
6
by: Lucien | last post by:
I have trouble using JavaScript to access an embedded real audio in netscape navigator 7.1 and mozilla 1.4 and 1.5 (It seems to work in NS 4.7) Eg. <EMBED NAME=javademo SRC="test.rpm"...
2
by: Yurij Nykon | last post by:
Hi all. How can I detect the version of Flash-Plugin installed in Internet Explorer? In Netscape i can do this with following java script navigator.plugins.description But it doesn't works...
1
by: Randy Weber | last post by:
I have a page with two frames, 'header' and 'main'. The following code works in Netscape, but in Internet Explorer. The second bgColor line produces an error: function test(){...
2
by: Michel Schilthuizen | last post by:
Hi, I am working on an application that can use functionlity in some sort of plugins. I have implemented this by using Assembly.LoadFrom and MethodInfo.GetMethods. The calling of the plugins...
8
by: D H | last post by:
Are there any plans by Microsoft or anyone else to ever create a browser plugin that can run .NET apps? One that can work in any browser like the Flash or Acrobat plugins? I know about smart...
7
by: denelson | last post by:
Does anyone know what might cause netscape not to open Data Access Pages from Microsoft Access 2000? I can open them fine with internet explorer, but not netscape.
3
by: ed | last post by:
What do you suggest?
7
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.