Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Execute Javascript from Applet

 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a need for an applet to execute some JavaScript functions on the window that contains the applet. We were using

ShowDocument("javascript:code")

A recent IE patch broke this by prohibiting javascript as a protocol. MS support tells us to put the script on another page and use the HTTP protocol to load that page and execute the script on load. Bah!

A quick Google for javascript and applet found the JSObject object written by NetScape and provided by Sun in the JRE. It seems to work fine with the security patch.

Does anybody know any reasons not to use JSObject? Any positive experience? Any other workarounds?
 
Murali Kurukunda
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used JSObject, JSException classes before. My experience has been positive with these classes. These are part of the JRE from version 1.4 onwards I think. I would think you have to deal with the issue of packaging these classes if you are deploying your application to browsers that have older versions of JRE's.
Murali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic