Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem while Invoking Applet's method from javascript

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am calling Applet's public method from javascript. In the method in applet which is called from javascript displays a dialog box(for eg. JColorChooser). After showing the dialog box browser hangs up.
I am able to call Applets methods from javascript when i open the page using InternetExplorer(for this I used the Object tag in the html file).If i use Netscape Navigator i am not able to invoke applet's method from javascript.
The Sample code which i writen is as follows.
The Applet class has the code:


Html File to load the applet has the following code:

 
Venkata Ramana
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Html code place a button and onclick call funt() function which is defined in the html code.
I placed this code while posting the topic, but it not allowed me to post.so removed the button code from the html code
 
Venkata Ramana
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Object tag replace "codebase" attribute value with
"http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn";
Earlier the value i mensioned value is from local systems directory.
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i know whats wrong but i dont have a solution
in NN we dont get embedded applet into the applets array in javascript. try doing,
document.applets.length, it will give you 0 and in IE it will give you 1.
i'm facing the same problem. i don't know how to make this work...
regards
maulin.
 
I don't like that guy. The tiny ad agrees with me.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic