Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-10-2009, 08:48 AM   #1
Registered: Sep 2006
Posts: 35

Rep: Reputation: 15
Need a Java Applet to utilize Java Script Functions

I want my applet to use java script funcions and code. I have been researching this forever and can not find an answer. It use to be able to be done in netscape using import netscape.javascript.*; or something along this line.

What is the new class file? Is there another way to do it?
Old 04-10-2009, 12:54 PM   #2
Registered: Dec 2008
Distribution: Ubuntu
Posts: 61

Rep: Reputation: 22
Tried it out using the first code example here and it worked in Firefox
Old 04-10-2009, 12:59 PM   #3
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

The short answer is "no-can-do": the HTML DOM Javascript lives in - vs. the sandbox the applet lives in - are two completely separate domains.

The longer answer is: most of the time you'll want to do this kind of thing, you probably want to use server-side JSP's (rather than client side applets). Honest!

But if you *must* integrate Java and Javascript on the client (where it's hard) vs. on the server (where stuff like Tomcat or JBoss makes it much, much more straightforward): here's a link:

'Hope that helps .. PSM

In any case, you'll need some external .jar - and you'll need the client to be able to install it on their PC and integrate it with their browser's JRE - in order for it to work. And if the client uses Firefox and IE ... they'll probably have to install and configure twice...

Last edited by paulsm4; 04-10-2009 at 01:04 PM.
Old 04-11-2009, 09:55 PM   #4
Registered: Sep 2006
Posts: 35

Original Poster
Rep: Reputation: 15
i figured it out. Thanks though.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java plugin installed correctly for Firefox but not able to view any java applet tvn Linux - Software 10 04-15-2010 02:13 AM
JAVA JRE installation to view java applet through browser dipenchaudhary Linux - Software 1 01-23-2006 09:20 AM
need some help with a java applet gulo General 1 07-14-2005 02:52 PM
Java Applet ekl_n Programming 2 02-26-2005 11:48 AM

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration