473,473 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Getting a line to be written in Netscape 4.8

I can get a source file to write html code fully in Iexplorer. However, in
Netscape 4.8, I cannot get it to write this particular line: <SCRIPT
LANGUAGE="JavaScript" SRC="src1.js"></script> in the code. All other lines are
written. Is there some trick I need to do?

The script file src1.js :

function selectFile() {
var pdbFile = 'file:///' + document.form1.fileN.value;
document.writeln('<html>');
document.writeln('<head>');
document.writeln('<title>Chime Viewer</title>');
document.writeln('<SCRIPT LANGUAGE="' + 'JavaScript' + '" SRC="' + 'src1.js'
+'"></script>');
//document.writeln('<SCRIPT LANGUAGE="JavaScript" SRC="src1.js"></script>');
document.writeln('</head>');
document.writeln('<body>');
document.writeln( pdbFile );
document.writeln( '<br>' );
document.writeln('<embed name="mmol" width=500 height=500 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>');
document.writeln('<form name=form1>');
document.writeln('<input type=file name="fileN">');
document.writeln('<input type=button onClick="selectFile()" value="Open
File">');
document.writeln('</form>');
document.writeln('</body>');
document.writeln('</html>');
document.close()
}

===========================
Thanks,
Jeff
Jul 20 '05 #1
9 1489


JeffFinnan wrote:
I can get a source file to write html code fully in Iexplorer. However, in
Netscape 4.8, I cannot get it to write this particular line: <SCRIPT
LANGUAGE="JavaScript" SRC="src1.js"></script> in the code. All other lines are
written. Is there some trick I need to do?


If that is inline code (code embedded in a HTML page) then you need
document.write('<script type="text/javascript" src="src1.js">' +
'<\/script>');
otherwise the parser will think the </script> closes the containing
<script> element.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
>If that is inline code (code embedded in a HTML page) then you need
document.write('<script type="text/javascript" src="src1.js">' +
'<\/script>');
otherwise the parser will think the </script> closes the containing
<script> element.


==================================
Martin,

Thanks for the quick response. I tried this and it shows up nicely in IExplorer
but not Netscape still. Everything else shows up.

Jeff
Jul 20 '05 #3


JeffFinnan wrote:
If that is inline code (code embedded in a HTML page) then you need
document.write('<script type="text/javascript" src="src1.js">' +
'<\/script>');
otherwise the parser will think the </script> closes the containing
<script> element.

Thanks for the quick response. I tried this and it shows up nicely in IExplorer
but not Netscape still. Everything else shows up.


Are you getting any errors in the Nescape JavaScript console?
Open that by typing
javascript:<enter>
in the location bar and check whether there are any errors.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #4
>Are you getting any errors in the Nescape JavaScript console?
Open that by typing
javascript:<enter>
in the location bar and check whether there are any errors.


=====================
Martin,

No errors are showin up. Here is what the source likes after running the scipt:

<BASE HREF="file:/C|/My Documents/JavaSTest/">
<HTML>
<HEAD>
<TITLE>Chime Viewer</TITLE>
</HEAD>
<BODY>
file:///C:\My Documents\JavaSTest\mmol.pdb
<BR>
<EMBED name="mmol" width=500 height=500 startspin=False spiny=20
src="file:///C:\My Documents\JavaSTest\mmol.pdb"
type=application/x-spt script="wireframe 25;
spacefill 85; zoom 150" color2d=black bgcolor2d=black > </EMBED>
<FORM name=form1>
<INPUT type=file name="fileN">
<INPUT type=button onClick="selectFile()" value="Open File">
</FORM>
</BODY>
</HTML>
===========

One other thing different I now notice is the very first line:

<BASE HREF="file:/C|/My Documents/JavaSTest/">

does not appear in the rewritten source in IExplorer.

Thanks,
Jeff

Jul 20 '05 #5


JeffFinnan wrote:

No errors are showin up. Here is what the source likes after running the scipt:

<BASE HREF="file:/C|/My Documents/JavaSTest/">
<HTML>
<HEAD>
<TITLE>Chime Viewer</TITLE>
</HEAD>


Are you just testing from the local file system or is that necessary for
your application? In my tests Netscape 4 loads the external JavaScript
src in the document.written HTML as soon as the whole things is loaded
via http: URL and not file: URL.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #6
>Are you just testing from the local file system or is that necessary for
your application? In my tests Netscape 4 loads the external JavaScript
src in the document.written HTML as soon as the whole things is loaded
via http: URL and not file: URL.


=======================
Martin,

Yes, I want to load local pdb files into this plugin for view molecules.
Jeff
Jul 20 '05 #7
I notice that in Netscape 7 it rewrites the code fine also like IExplorer.
Unfortunately, this plugin does not work in the higher Netscapes.
Jul 20 '05 #8


JeffFinnan wrote:
Are you just testing from the local file system or is that necessary for
your application? In my tests Netscape 4 loads the external JavaScript
src in the document.written HTML as soon as the whole things is loaded
via http: URL and not file: URL.
Yes, I want to load local pdb files into this plugin for view molecules.


I am not sure that will work with Netscape 4, it seems to insist on not
to load the script file in the document.written HTML (as long as loaded
via file: URL). Using frames where the JavaScript is statically included
in a frameset and you only document.write a frame's content which then calls
top.functionName()
to access functions in the script file should be a workaround.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #9
>Documents\JavaSTest\mmol.pdb


</EMBED><FORM name=form1><INPUT type=file name="fileN"><INPUT type=button
onClick="selectFile()" value="Open File"></FORM>
===========


====================
I notice that not all of what I had pasted in before is showing up in the
posts. This line with some periods added (to hopefully show the line) shows up
as the very first line in Netscape 4.8:

<.BASE HREF="file:/C|/My Documents/JavaSTest/".>

Jul 20 '05 #10

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

Similar topics

2
by: Skulled2003 | last post by:
Hi there, I was wondering if it was possible to get the screen display size and other associated properties somehow either using python modules or if possible using Tk methods. Thanks a lot. ...
2
by: Skulled2003 | last post by:
Hi, I have a question on getting information from the os to be used in one of my programs. What i need to accomplish is a list of languages that are installed or can be viewed on the system. I...
3
by: yzzzzz | last post by:
Hi I have: <div onkeypress="go(event)">...</div> and: function go(event) { alert(event.keyCode); }
1
by: mark.reichman | last post by:
I have text fields in my form with the same name. I can reference the value of these fields in IE 6.0 like with document.form.field.value. However, netscape 4.7 seems to croak. Why? What is the...
1
by: Toralf Lund | last post by:
Is there any way at all I can get a user's login name from within JavaScript on Unix/Linux with Mozilla browser. If not, how about the home directory? I know there are *usually* variables...
8
by: Hal Vaughan | last post by:
Is there a maximum length for Javascript program lines? What about strings? Is there a limit on string length? I found some references that said the maximum string length was 256 characters,...
3
by: Parrot | last post by:
Does anyone else have a problem with the Mozilla browser not expanding a multi-line textbox to its proper size? My textboxes are all small and do not display mu;tiple lines in Mozilla or Netscape...
5
by: Rick | last post by:
I wrote the following code as part of a page where users can reorder a list of items by highlighting an item in a list box and clicking an "up" or "down" button to move the items around. The code...
1
by: JJ_377 | last post by:
This works in Internet Explorer, but not in Netscape (8). Note this script was borrowed from another posting. Can anyone help? Thank you. function ErrorMessage() { try { var...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.