• 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Calling a java function from javascript

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
I have created a java applet and wish to access one of its methods in Javascript, so I am using the following HTML code:

The java code is as follows:

There doesn't seem to be a problem running the applet, but when I call the javascript function I get the following error message:
'Object doesn't support this property or method'
Does anyone know why this is? And how I remedy it?
Thanks and regards,
Sean
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Are you getting error in function sendMessage()?
To confirm this put alert statements before and after
window.document.formName.variablePassedIn.value = window.document.appletName.readReturnValue();
Also change
alert(window.document.formName.variablePassedInvalue);
to
alert(window.document.formName.variablePassedInvalue.value);
[This message has been edited by Dilipkumar Kalyankar (edited August 16, 2001).]
[This message has been edited by Dilipkumar Kalyankar (edited August 16, 2001).]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!