• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem while Invoking Applet's method from javascript

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Anderson gave himself the promotion. So I gave myself this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic