473,396 Members | 2,140 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,396 software developers and data experts.

can you call a java

Hello,

I'm having a problem using Javascript. This may not even be possible,
but maybe there is another way of going about it.

I have a bunch of .js files that I insert into my my html file using
the <script> tag, and this works just fine. The .js files contain
info about the menu, table set up, etc. and take care of the page
format.

But now, I have a tidbit of Javascript in an htm file, and this tidbit
opens up a new window with some information on it. I want to insert
all of the menu and format javascript files on this new window that it
opens.

so, my question is: how would I do this: (since this doesn't work!)

output.document.write('<SCRIPT language=JavaScript
src="/scripts/menu_array.js" type=text/javascript></SCRIPT>');

???

Any help is very much appreciated!!

Laura
Jul 23 '05 #1
5 1349
On 14 Jul 2004 08:59:17 -0700, Laura wrote:
Hello,


Sub: can you call a java

Hi Laura!

Unfortunately I cannot answer your Javascript question,
as I am just here to learn as well, but I *can*
reliably inform you that 'Java' is a completely
separate and different language from 'Javascript'.

It is important not to mix up the terms,
especially when you are posting to the
technical groups for these languages,
because it can confuse those who are 'skimming'
looking for posts that can be answered quickly.

This one, for example, might prompt something like..

Java != JS
<http://www.physci.org/codes/javafaq.jsp#js>

;-)

I'll bow out now, and hopefully one who
is conversant with Javascript will happen
by in a moment..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2
In article <3b**************************@posting.google.com >,
sa******@aecl.ca enlightened us with...

But now, I have a tidbit of Javascript in an htm file, and this tidbit
opens up a new window with some information on it. I want to insert
all of the menu and format javascript files on this new window that it
opens.

so, my question is: how would I do this: (since this doesn't work!)
Depends on how you opened it and where it got its content from.

output.document.write('<SCRIPT language=JavaScript
src="/scripts/menu_array.js" type=text/javascript></SCRIPT>');


That would work fine IF you opened and wrote all the rest of the content
dynamically as well. It sounds like you are opening an already existing
document, though, so it won't work.

You could hack a script that targeted the new window with the javascript
protocol and appended a script element to the page IF the content of the
page is from the same domain. Is it? Sounds like it is.

Such a script would only work in DOM browsers, such as IE6+/NN7+. Is
that acceptable?

--
--
~kaeli~
User: The word computer professionals use when they mean
'idiot'.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3
JRS: In article <3b**************************@posting.google.com >, seen
in news:comp.lang.javascript, Laura <sa******@aecl.ca> posted at Wed, 14
Jul 2004 08:59:17 :

But now, I have a tidbit of Javascript in an htm file, and this tidbit
opens up a new window with some information on it. I want to insert
all of the menu and format javascript files on this new window that it
opens.


I have code which will display named functions in a new window, and at
least most code can be put into a function.

See <URL:http://www.merlyn.demon.co.uk/js-index.htm#CD> and press the
button.

That may help with what you want.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://jibbering.com/faq/> JL / RC : FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #4
Hi Andrew (and all),

I'm sorry about the subject of this posting. In my absentmindedness,
while I was thinking of an effective title, I didn't complete it.

I apologise for the the confusion!

Laura

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #5
Laura wrote:
But now, I have a tidbit of Javascript in an htm file, and this tidbit
opens up a new window with some information on it. I want to insert
all of the menu and format javascript files on this new window that it
opens.

so, my question is: how would I do this: (since this doesn't work!)
"Does not work" is a useless error description. [psf 4.11]

<http://jibbering.com/faq/#FAQ4_43>
output.document.write('<SCRIPT language=JavaScript
src="/scripts/menu_array.js" type=text/javascript></SCRIPT>');
I suggest that one of the previous lines matched at least partly

var output = window.open(...);

If so, and if this script is included in a HTML document, it is
important that you escape End Tag Open (ETAGO) delimiters within
the script. The markup parser will probably consider either the
`</script>' or any ETAGO delimiter (`</') the end of the script
that *creates* the popup's document which would in turn result
in erroneous, because incomplete, script code.

Furthermore, you need to check if `output' is a useful Window
object reference before you access it, then open the stream
before you can reliably write to it, and close it when you are
finished:

if (output && !output.closed)
{
var d;
if ((d = output.document) && d.open && d.write && d.close)
{
d.open();
d.write(
'<!-- additional code to make this Valid (X)HTML -->'
+ '<script src="/scripts/menu_array.js"'
+ ' type="text/javascript"><\/script>'
+ '<!-- additional code to make this Valid (X)HTML -->');
d.close();
}
}
???


Your Question Mark key is borken. [psf 2.3]
PointedEars
Jul 23 '05 #6

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

Similar topics

5
by: Ayesha Ahsan | last post by:
Hi, I use Runtime.getRuntime().exec(command) to make my system call. For Windows based Dos, i add "cmd /c" before I type in my system call. So for example make the system call "dir": String...
6
by: Dave Kuhlman | last post by:
Is JPE (the Python Java Extension) being used widely/actively? I tried to build it (with Python 2.3.4, j2se 1.4 on Debian GNU/Linux) and had quite a bit of trouble. And, then, the samples did...
6
by: Eugene A | last post by:
Hello. In this call from a Java prog to a Oracle SP I am trying to pass along some varchars and a cursor, but apperently the syntax of the call to the stor proc is incorrect. What am I doing...
1
by: Stacey | last post by:
I have an html page that uses java to zoom in and out of an image. I just want to be able to call a cgi script from the form in the html. The java allows the user to drag a box to any size on the...
1
by: John Sidney-Woollett | last post by:
Is it possible to call a Postgres stored function (as if it were a procedure), using a PreparedStatement which will receive no return value, instead of having to use a CallableStatement and ignore...
4
by: Jean-Marc Blaise | last post by:
Dear all, I have simulated the windows MULTI application with a java program calling the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or ZLinux. If the proc is NOT FENCED,...
46
by: Steven T. Hatton | last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it says. http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html <shrug> -- NOUN:1. Money or...
11
by: BigZero | last post by:
Hello, can i call Java method.That is java code from php,here what i m looking for i have class called DB in this class all the DB related things ,like DB connection DB insert,DB read etc...
5
madzman23
by: madzman23 | last post by:
Hi guyz, I kinda new here and I dont know if there is post that similar to my question, because I really needed immediately I am posting my question. Can anyone here help me how to call a Java...
1
by: vani1987 | last post by:
Hi, I'm new to the web services. I've to call the two java web services from other network system from classic ASP page. There are two java webservices are hosted in one server and this ASP...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.