LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-10-2009, 08:48 AM   #1
circuit_girl
Member
 
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
aspire1
Member
 
Registered: Dec 2008
Distribution: Ubuntu
Posts: 61

Rep: Reputation: 22
Tried it out using the first code example here http://www.rgagnon.com/javadetails/java-0172.html and it worked in Firefox
 
Old 04-10-2009, 12:59 PM   #3
paulsm4
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:

http://swinglabs.org/docs/presentati...ng_secrets.jsp

'Hope that helps .. PSM

PS:
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
circuit_girl
Member
 
Registered: Sep 2006
Posts: 35

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


Reply


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 02:36 AM.

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