Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

JavaScript to Java Applet Comm W/O Plug-in

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've managed to figure out how to call applet methods from JavaScript using the Java Plug-in and the OBJECT tag in IE or the EMBED tag in Netscape.
I need to know how to do this, in IE and Netscape, without using the Java Plug-in. Actually, I know that in Netscape I can use LiveConnect and the regular APPLET tag. But I don't have a clue how to do this in IE. Could someone shed some light?
Thanks,
Dennis
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I was also using javascript for jsp and applet communication , but it is giving me error "object does not support this property " could u send me the code wher u r calling applet method from jsp.??
regards
anubha

Originally posted by Dennis Spathis:
I've managed to figure out how to call applet methods from JavaScript using the Java Plug-in and the OBJECT tag in IE or the EMBED tag in Netscape.
I need to know how to do this, in IE and Netscape, without using the Java Plug-in. Actually, I know that in Netscape I can use LiveConnect and the regular APPLET tag. But I don't have a clue how to do this in IE. Could someone shed some light?
Thanks,
Dennis


 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do this in IE too, but you need to include the LiveConnect jar files in your distribution.
David
------------------
David Kane
david_kane@houseofyin.com
Author of Software Architecture: Organizational Principles and Patterns
http://www.vraps.com
http://www.houseofyin.com
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the life of me, I can't get my browsers to recognize and call my applet method. Would you mind sending me or posting a snippet? Thanks in advance. -j

Originally posted by Dennis Spathis:
I've managed to figure out how to call applet methods from JavaScript using the Java Plug-in and the OBJECT tag in IE or the EMBED tag in Netscape.
Thanks,
Dennis


 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can not understand what seems to be the problem.
Following is not enough to call (PUBLIC) applet method from any browser??
I am using it and working fine both in IE and Netscape!!
<HTML>
<HEAD>
<TITLE>Worksheet</TITLE>
<SCRIPT>
function submitRequest()
{
// MyF1 is applet and SaveWorksheet is a public method
// which takes
// String as a parameter.
document.MyF1.SaveWorksheet(document.wkshtForm.Note.value);
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#cfcfcf">
<FORM NAME="wkshtForm" METHOD=GET
<APPLET CODE=WkShtApplet.class width=1000 HEIGHT=400 NAME="MyF1">
</APPLET>
<CENTER>
<B>Note: </B>
<BR>
<TEXTAREA NAME="Note" VALUE="" ROWS=5 COLS=51 WRAP=SOFT>
</TEXTAREA>
<BR>
<BR>
<INPUT TYPE=submit NAME="submitButton" VALUE=" SAVE " OnClick="submitRequest()"
>
<INPUT TYPE=reset NAME="cancelButon" VALUE="CANCEL" >
</CENTER>
</FORM>
</BODY>
</HTML>
~
 
Jay Lockwood
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am so sorry; I should have written that I can't call a public method in my SWING APPLET! I have been able to call public methods in non-swing applets.
Sorry...

Originally posted by Rakesh Ray:
I can not understand what seems to be the problem.
Following is not enough to call (PUBLIC) applet method from any browser??
I am using it and working fine both in IE and Netscape!!
~


 
Rakesh Ray
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can find the answer here.. http://www.javaranch.com/ubb/Forum23/HTML/000760.html
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dennis,
can you post the code. I am not able to call applet method on netscape using plug-in.(EMBED) it works fine with IE (OBJECT)
Thanks.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic