Interview Questions  

Go Back   Interview Questions > Interview Questions & Answers > Information Technology > Scripting > Java Script

Java Script Java Script Interview Questions, Learn by sharing Java Script Interview Questions asked in various companies, Get Career advices, Interview Procedures from Java Script experts, Post asked Java Script Interview Questions and Answers.

   

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-10-2008, 07:17 AM
Senior Member
 
Join Date: Mar 2008
Posts: 2,136
Default Can we call a Java Applet using a JavaScript

Can we call a Java Applet using a JavaScript function?
Reply With Quote
  #2 (permalink)  
Old 07-07-2008, 04:44 AM
Junior Member
 
Join Date: Jul 2008
Posts: 4
Default

Getting Java Applets to talk to JavaScript
Not so long ago I got a couple of e-mails. One asked if I knew how to control an Applet using JavaScript and the other asked me if I knew how to call JavaScript routines from an Applet. At the time I didn't have a clue. However, not being one to turn down a challenge I managed to solve the first problem and this document describes how I solved the second.

Having little experience of Applets I had to ask myself: "CAN it be done?". Well, having looked behind the scenes of the Action Buttons in the R5 View Applets, I discovered they do nothing more than call JavaScript function similar to their HTML counterparts, I knew it could be done. So I set off to find out how...

By way of example here is an Applet that lets you select a colour or add a new one and then, using the "Add" button, pass the value to a JavaScript function in the document. This function then appends the value to the