Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

scripting applets from javascript

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a complete java novice, but I'm trying to create a very simple applet that I can script from JavaScript in my browser (IE6), i.e. I want to call it's methods from JScript to control it. I downloaded an easy example from the web which worked fine, but when I rebuilt the applet, I could no longer call any of the it's methods from JavaScript (get a "object doesn't support this property or method" error). I eventually figured out that if I built it with Java version 1.2.x it works, but if I build it with 1.3.x or later it gives this error. I'm not sure what I need to do to get it to work with newer versions. It does not seem to matter what version of the Java VM is on the machine I actually run it on, just the version it is built with. Can someone tell what what I'm doing wrong?
thanks,
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi algy
I have not any experience with JScript but as far as Applet-Javascript communication is concerned then I remember that in IE if we use OBJECT or Applet tags and give ID to it and call "public" methods on that applet then it works. In Netscape if we use EMBED tag then we can't invoke applet's method using assigned NAME attribute in the EMBEd tag for that applet...
I am not sure how much does this help...I don't think it would be the issue depending upon just JDK we use to compile things...
Regards
Maulin
 
Not so fast naughty spawn! I want you to know about
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic