#include Java in HTML ?

P

peterken

Hello group

Being a rather newbie I was wondering if in HTML one can include a
javascript file in a HTML page using some C/C++ syntax like <#include
"file.h">.

To describe the prob:
I've got a rather large set of html-pages all using identical
javascript-functionality BUT using/modifying some local parameters of the
html-file itself.
I'd love to "include" the java-file as "included file" and call upon it's
functions, would make any alterations to the JS itself easier since not
editing all individual pages.

Note: My providers server doesn't support SSI, PHP, ASP etc but Java seems
to work OK for every individual page (at least....so far it does).

Thanks
P.
 
R

Ronx

Java and JavaScript are two very different, completely unrelated, animals.
Java will not work on new installations of IE6 or WindowsXP unless the
users download a Java Virtual Machine from Sun's website.

Assuming you mean JavaScript and do not mean Java, place this in the head
section of each page:

<script language="JavaScript" type="text/javascript"
src="path/to/script.js"></script>
 
P

Peter Aitken

Ronx said:
Java and JavaScript are two very different, completely unrelated, animals.
Java will not work on new installations of IE6 or WindowsXP unless the
users download a Java Virtual Machine from Sun's website.

That's true of only certain installations - most are fine.
 
S

Steve Easton

imho, *Most* doesn't get it.

All OEM installations ( new computers, Gate way Dell etc ) with XP and IE 6 do
not have it installed.
SP 1 installed it ( if they even installed SP 1 ) I would bet most people with
Dial Up Connections didn't.
Unfortunately IE-6 is not configured to prompt a user to download and install it
from sun.java if a page or web is opened that requires it.


--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed..................
...............................with a computer
 
R

Ronx

No, it's only certain installations of WinXP that *do* have the Microsoft
JVM.
The original Windows XP was produced without the JVM, though this was
available through a download (if you could find it).
SP1 for WinXP included the JVM for about three months, then the JVM was
removed from SP1, and the download from Microsoft was also removed; so only
for a very short period has the JVM been available as part of the Windows
XP installation.
JVM with IE6 followed the same pattern.
 
P

peterken

It was Javascript I was talking about, sorry if my post was a bit confusing.
Ronx's solution works fine, thanx, saves me lots of editing now.



Java and JavaScript are two very different, completely unrelated, animals.
Java will not work on new installations of IE6 or WindowsXP unless the
users download a Java Virtual Machine from Sun's website.

Assuming you mean JavaScript and do not mean Java, place this in the head
section of each page:

<script language="JavaScript" type="text/javascript"
src="path/to/script.js"></script>
 
J

Jreder

I found an interesting article on a messageboard that referred to an Article
published by Lisa Wollin. It was titled "Customizing Code Snippets in
FrontPage 2003" and talks about using XML to perform something of a
<#include - type of thing. It was sorta what I was looking for at the time.
That article was 7 pages and worth a read if you use FP 2003.

Good luck!

Jim R.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top