|
-
javascript java applet communication
//html code is
============
<SCRIPT language="JavaScript">
function startJSFractal() {
try{
var a= document.getElementById('ramesh').a;//working fine
var val = document.getElementById('ramesh').sec; //error is undefined
}catch(e){
alert('error:::'+e);
}
}
</SCRIPT>
<form name="Form1">
<embed code="demo.app.First" id="ramesh"
type="application/x-java-applet"
pluginspage="http://java.sun.com/out-of-proc-plugin-url-placeholder.xpi"
width="200" height="200">
</embed>
<input type="button" name="Button1" value="Start"
onClick="startJSFractal()" language="JavaScript">
</form>
First class
==========
public class First extends Applet{
public int a=10;
Second sec= new Second();
}
}
i want call second class reference from javascript using embed tag applet reference.but i getting the
error undefined please help me.........thanks
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks