JavaScript's Applet Object

I am trying to use JavaScript's Applet object to access my applet in the left frame, from a java script embedded in a JSP file in the right frame.
I can assign the object to a variable as in:
var ap = parent.frames["leftframe"].document.applets[0];
But when I try to call a public method on the applet as in:
ap.TestApplet();
I get an error in the page saying:
Error: Object doesn't support this property or method.
My applet was embedded in the left frame with <jsp:plugin> tag. So I am not directly using HTML's Applet tag. So I am not able to pass MAYSCRIPT flag to the HTML's applet tag. Question is, do I need MAYSCRIPT flag for what I am trying to do? If so, is there any way to pass MAYSCRIPT flag?
Thanks for any help.
- Krishna.

Does anyone have any thoughts on this?
Thanks,
Krishna.

Similar Messages

  • Javascript to applet calls with Java Plugin

    Hello,
    I'm working on getting existing applets to work with Sun's Java Plugin (v 1.3.1_03). I'm not sure how to modify calls to the applet from JavaScript. For example:
    document.applets[0].getClientHomeFromEnvironment();
    This works fine using the regular browser VM in IE or Netscape, but is not valid when using Sun's Plugin. I found the following in the Developer FAQ:
    Q: Does Java Plug-in support Java-JavaScript communication?
    A: Yes, Java Plug-in supports basic, bidirectional Java-JavaScript communication. The following, however, is a known incompatibility.
    In the Microsoft implementation, applet methods and properties exposed in JavaScript are exactly the same as the methods and fields in the applet object. In Java Plug-in, an applet's methods and properties are exposed in JavaScript through JavaBeansTM introspection, which treats the applet's fields in a different manner than the Microsoft VM. Therefore, JavaScript accessing fields in an applet object may not work the same when run on JRE/Java Plug-in.
    But it's still not clear to me how I would go about calling the applet. Has anyone done this successfully?
    Thanks,
    -Dave Meier.

    Yes and no....
    I'm using the internal browser JVM when the user has NS < 6.0 and IE < 5.0. But.. if they have NS 6.0+ or IE 5.0+ and have the browser configured properly, it hands off to the plugin. That does work.
    If you must use the OBJECT or EMBED tags... Your best bet are the release notes for the plugin to see what they say about Java-JavaScript support. You could start here...
    http://java.sun.com/products/plugin/1.3/enhancements/oji.html
    JZ

  • Passing data from Javascripts to Applets

    Hi,
    I've wrote a small applet for lists but when I try to pass data from my
    JavaScript to my applet, I get an "Error: Object doesn't support this property or method". I get this error with a select other sites including the page I'm writing, leading me to believe I may not have installed requried files or set required options, though I've checked my settings . I've included the listing of the code snippet where the error occurs.
    document.listApplet.testMethod()OR when I use:
    document.applet(listApplet).testMethod()The applet is loaded by this statement:
    <OBJECT CODE="CustomAppletList" NAME="listApplet" ID="listApplet" WIDTH="1000" HEIGHT="600"></OBJECT>and loads fine but the error persists when attempting to call public method in my applet. Can anyone suggest ideas how I can successfully pass data from my JavaScripts to my applets?
    Devyn

    Hi,
    Thnx for the reply. I've tried as you suggested and modified my <OBJECT> line to:
    <OBJECT CODE="CustomAppletList.class" NAME="listApplet" ID="listApplet" WIDTH="1000" HEIGHT="600">
    <PARAM NAME="scriptable" VALUE="true"></PARAM>
    </OBJECT>But the error persists. I'm using IE6. I did not have such errors with IE5.
    I use the following code to test the applet tag I assigned at each step:
                        if (document.listApplet) {
                             document.write ("Applet Object (document.listApplet) exists.")
                        } else {
                             return
                        if (document.listApplet.object) {
                             document.write ("Applet Object (document.listApplet.object) exists.")
                        } else {
                             return
                        if (document.listApplet.object.testMethod) {
                             document.write ("Method textMethod() in applet has been validated and exists!")
                        } else {
                             document.write ("[2]")
                             return
                   document.write ("[11]")The debugging info from this code at the end of the html document I'm writing is:
    [1]Applet Object (document.viewer) exists.Applet Object (document.viewer.object) exists.[2][11]
    Devyn

  • Cannot Acccess Applet Object from Java Script

    Hi,
    I am using jRE1.5, and Kava Chart Applets. Those applet jars are compiled in jdk 1.5 version. I have created one jsp where I used ,<applet> tag. The problem is when ever I am going to access the applet object from java script it is not returning the actual java applet object, when put an alert message it shows [object]. So i am not able to access the methods or the applet class.and also the screen gets hung, nothing is coming.It get stuck at the point where i tried to access the applet method like document.getElementById(applet_id).<<<some method of the applet class>>.Also it is not showing any kind of javascript error or Applet class exceptions.
    But the strange thing is, when i use jdk 1.6, the page is running fine.Also when i try to print the applet object from javascript it is showing the proper class name.
    Please help me solving the problem.

    A number of changes and improvements were made between 1.5 and 1.6 - the entire plugin is new. You need to change to 1.6, as 1.5 goes EOL about November this year and future changes to this area in 1.5 are unlikely.

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • At what percent e-tester can identify java applet objects. Plz see message.

    Hi,
    Me new to this group.
    I am here to find out whether e-tester can test java applet or not.
    I am testing a web application which is completely Java applet base.
    Envirnment used jdk1.1.8 and Jre1.4.
    I have been trying to identify applet object used in our application.
    problem i faced:
    when i set java option in option seting for both Microsoft applet and sun system applet. where my system having jdk1.1.8 and jre1.4.
    Recording on above envirnment I am able to record my application but i can not play that. On this case I marked Abbot script generated.
    when uninstall jdk and jre.
    I am able to record and play my application still some step. But I am not able to customize it.
    this application also uses StarTree a hyporbolic tree API from
    "Business Object" now bought by SAP (this api used inside applet
    frame).
    Is any one work on e-tester to automate in and out of an application which is built in java applet.
    Can some one help me to figure out where I am doing wrong.
    Before this I worked on e-tester year back to automate one of our application and still we are doing our regression on that.
    Expecting some help

    When you say customize, are you referring to parameters? They is handled differently with applets. I believe there is documentation on this.

  • JavaScript runtime error: Object doesn't support property or method 'Load'

    I'm pretty new to SharePoint 2013 apps and CSOM. I have written a simple SharePoint-hosted App in Visual Studio 2013 which attempts to display the current user's user profile picture using CSOM and JavaScript. Here is the code in my App.js file:
    $(document).ready(function () {
        var context = SP.ClientContext.get_current();
        var peopleManager = new SP.UserProfiles.PeopleManager(context);
        var userProperties = peopleManager.getMyProperties();
        context.Load(userProperties);
        context.executeQueryAsync(function (){
            if (properties) {
                var pic = userProperties.get_pictureUrl();
                $('#userProfileImage').attr("src", pic);
    I am getting error "JavaScript runtime error: Object doesn't support property or method 'Load'" on line "context.Load(userProperties);"
    I have SP.UserProfiles.js referenced, which is why this command executes successfully: var peopleManager = new SP.UserProfiles.PeopleManager(context); Is it my context object or userProperties object that is causing this error, and why? Thanks
    in advance for your help.
    Frank Foreman

    Hi,
      This method is case Sensitive, try this context.load(userProperties);

  • JavaScript to Applet call freezes the Browser

    Hi,
    I am using javascript to applet communication to do some processing in my current project. The processing done in the applet is little heavy, whenever applet is processing the request, Browser freezes and user is not able to work with browser anymore. Even if you try to open new browser window its response is very slow.
    Basically browser window is not able to refresh its contents and appears to be freeze to the user while the applet is processing the request.
    is anybody faced this ( javascript to applet communication) problem earlier?
    Any solution/workaround to this problem?
    Thanks,
    panyog

    Martin,
    Thanks for your reply. whatever you have mentioned is correct. Applet is eating up the resources. But the problem is browser window is not getting refreshed appears
    to be freeze.
    Following are the details of the scenario
    1) Browser opened with mutilple processing option to the user.
    2) User selects some of them for processing and call process.
    3) here we have used javascript call to send for processing to the applet .
    Here javascript call to Applet, one by one getting processed.
    4) Applet starts processing, displays that an options
    are getting processed, please wait. ( here the window appears closes.)
    5) Once the window is gone, the browser which was previously
    opened is freeze . All the text and all are lost nothing is visible.
    Applet is still processing further requests, for user the browser is freeze.
    User try to open another browser window, Window opens up but it is
    really slow.
    How can we refresh the browser window?
    javascript reload does not work as it tries to process the option again?
    from applet we cannot refresh the Browser window...
    Is there any way we can it?
    Thanks and Regards,
    panyog

  • Retrieve applet object

    I'm fairly new to Java and I've been concentrating my efforts in applet programming. One thing I've noticed is that I seem to require the Applet object a lot in my code as I'm doing a lot of file reading (applet.getCodeBase, etc). I have a few instances in my code where I pass the applet object to different packages to perform basic operations and I'm starting to feel as if I'm doing this wrong.
    Is there a way to obtain the applet object using a global static function?

    Hi Mr Lob, will you think about the fact seriously that still no one seems to have understood your problemI know, the talent here is shocking.
    As often illustrations could help...I agree when you are demonstrating algorithms, discussing implementation, compilation errors etc. Mind, I would have knocked something up for you if you'd have responded with some decency and not made out there was a problem with my post. Telling me to post a demo is impolite, you could have asked to see something and I would have gladly responded. You don't know me & I don't you know, so you shouldn't assume you have superiority over me.
    I just wanted a brief code that could illustrate your problem/issue.You'd have a class declaration (unrelated to 'Applet') with an empty function member, in it would be a comment saying:
    // I would like to get applet object the libraries invoked at this point in the code...Close your eyes and imagine it...
    So it is plain obvious that the looser in these word battle is you, not petes1234 et al.LOL. Firstly, I never said petes1234 was a 'loser', he's just an idiot for posting unrelated & directly offensive comments. It's water off a ducks back, mind. Secondly, there's no way I'm a loser posting what I have. However, I will settle for 'loser in the quest to find an accomplished Java programmer within this public forum.'
    I thought I was a part of the 'do-not-help' list? Why are you still posting? Let it lie...
    Just so you know, I found an answer to my question elsewhere asking exactly the same thing. Now, .... "Think about that!"

  • Inter-applet object shareing concepts in java card

    hi there.
    what is a way of implimenting inter-applet object shareing in java card?
    is there any shared area of JCRE for sharing some values among some applets in same java card?
    thanks.

    hi, as i know, there are three approaches:
    1: shareable interface;
    2: entry point;
    3: global array;
    and if the applet has JCRE privilege, then it is overwhelming.
    for details , please refer to the JCRE Specification.

  • Get Applet object

    Hi everybody,
    I have several frames in an HTML page (nothing in static, all is generated).
    I have 1 applets in the frame 1 and an applet in the frame 2.
    I would like to get the applet object (java.Applet.applet) of the applet 1 in the applet 2 ...
    How could I do ?
    For the moment, I get :
    JSObject jsXelonContainer = (JSObject) ((JSObject) ((JSObject) window.getMember("top")).getMember("frames")).getMember("myFrame1");
    JSObject myDoc = (JSObject)jsXelonContainer.getMember("document");
    JSObject applets = (JSObject)myDoc.getMember("applets");
    Nothing is null at this point. But I don't know how to get the Applet I want from the "applets"
    May be is there another simplier way ...
    Any idea ?
    Thanks in advance
    Rafax.

    Ok.
    In my case, it is an applet.
    - The code declaration :
    <OBJECT classid="clsid:8AD7C840-044E-11D1-B1E9-00805F499D93" width="200" height="200" align="left"
         codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-122-win32.cab#Version=1,2,2,0" name="bootstrap" >
         <PARAM NAME="code" VALUE="com.elogiq.xelon.client.web.bootStrap">
         <PARAM NAME="archive" VALUE="../jar/myArchive.jar">
         <PARAM NAME="codebase" value="./class">
         <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
         <PARAM NAME="name" value="myApplet">
         <PARAM NAME="scriptable" value="true">
         <PARAM NAME="MAYSCRIPT" value="true">
    </OBJECT>
    the classId your are saying ... is it the classid ? (I don't think, but ...)
    Thanks,
    Rafax

  • Applet object

    can i somehow get the refernce of the applet object which the browser creates.
    i am writing a class which has to b deployed in a web server.
    can i get the ref of the applet object which the browser makes on a client request
    thanx in advance.
    Pradnya

    You mean you want to get a reference to an Applet instance on the server?
    I would imagine that in the majority of environments this is not possible.
    Could you provide more information about what you're trying to do?

  • Applet/object param name="legacy_lifecycle" value="true"/ documentation?

    I've recently stumbled across this applet/object parameter as a solution to a problem. However I can't find the official documentation of it anywhere, and believe me I've looked. I did find a reference to it in some Oracle product documentation but nowhere in the Java Plugin or Deployment documents. Has anybody spotted it anywhere? Urban myth? Legend? It certainly seems to work.
    Edited by: EJP on 6/03/2012 20:36: corrected typo in title

    Searching an old jdk source download shows it is not used by Java per se.
    $ pwd
    /home/download/java/src/jdk-6u23-fcs-src-b05-jrl-12_nov_2010
    $ find . -type f -exec grep -H legacy_lifecycle "{}" \;
    deploy/src/plugin/share/classes/sun/plugin/AppletViewer.java:        String lifecycle = getParameter("legacy_lifecycle");
    deploy/src/plugin/share/classes/sun/plugin2/applet/Applet2Manager.java:        String lifecycle = getParameter("legacy_lifecycle");
    deploy/src/plugin/share/classes/sun/plugin2/applet/Applet2ManagerCache.java:if (appletParameters.get("legacy_lifecycle") == null)
    deploy/src/plugin/share/classes/sun/plugin2/test/LegacyTest2AppletFrame.html:Legacy Lifecycle Automated Test #2 -- two legacy_lifecycle applets on the same page
    deploy/src/plugin/share/classes/sun/plugin2/test/LegacyTest2AppletFrame.html:<param name="legacy_lifecycle" value="true"></param>
    deploy/src/plugin/share/classes/sun/plugin2/test/LegacyTest2AppletFrame.html:<param name="legacy_lifecycle" value="true"></param>
    deploy/src/plugin/share/classes/sun/plugin2/test/LegacyTestAppletFrame1.html:Legacy Lifecycle Automated Test #1 -- two legacy_lifecycle applets in different frames
    deploy/src/plugin/share/classes/sun/plugin2/test/LegacyTestAppletFrame1.html:<param name="legacy_lifecycle" value="true"></param>
    deploy/src/plugin/share/classes/sun/plugin2/test/LegacyTestAppletFrame2.html:<param name="legacy_lifecycle" value="true"></param>
    deploy/src/plugin/share/classes/sun/plugin2/test/liveconnect/LegacyLifecycleLiveConnect.html:Tests LiveConnect against a legacy_lifecycle applet. Reload and switch
    deploy/src/plugin/share/classes/sun/plugin2/test/liveconnect/LegacyLifecycleLiveConnect.html:    <param name="legacy_lifecycle" value="true">
    $

  • Is jre1.4 still support javascript to applet communication?

    is jre1.4 still support javascript to applet communication?
    I can't get the method in applet from javascript in jre1.4. Are there have a different way to communication?

    I have a similiar problem. Left a post in the Signed Applet board. I can get the methods called on my applet when operating over HTTP, but when I am on a page served from HTTPS, the browser chews up memory, goes to 100% processor utilization, and the method is never called. This is with the 1.4 plugin.
    Suppose this is related ?

  • Passing data from JavaScript to Applets (Error when trying to pass data)

    Hi,
    I've wrote a small applet for lists but when I try to pass data from my
    JavaScript to my applet, I get an "Error: Object doesn't support this property or method". I get this error with a select other sites including the page I'm writing, leading me to believe I may not have installed requried files or set required options. I've included the listing of the code snippet where the error occurs.
    document.listApplet.testMethod()OR when I use:
    document.applet(listApplet).testMethod()The applet is loaded by this statement:
    <OBJECT CODE="CustomAppletList" NAME="listApplet" ID="listApplet" WIDTH="1000" HEIGHT="600"></OBJECT>and loads fine but no data is passed through it's public methods. Can anyone suggest ideas how I can successfully pass data from my JavaScripts to my applets?
    Devyn

    this should work for you. In your javascript do this.
    var myApplet=document.listApplet;
    myApplet.testMethod()
    If you need more help let me know.
    Paul

Maybe you are looking for

  • CR XI R1: viewer can't open report with UFL from COM dll

    Hello all! I faced the following problem: report which is uses functions from COM dll doesn't works on customer's pc. CRViewer throws exception when calling ViewReport() method. GetLastError() gives just 0 ... All other reports without functions from

  • WEB-INF/flex/services-config.xml???

    I am confused about this file and it's location. In my environment (MX 7.02/Apache/Linux) the WEB-INF/flex/ folder resides here: /opt/coldfusionmx7/wwwroot/WEB-INF/flex/ However, the server is configured to serve web pages from this location: /apache

  • Two different users, same contacts, calendar, etc.

    Howdy everyone!  I need some help.  First, I consider myself fairly smart when it comes to iOS products, etc. so I've tried to mess with this on my own before reaching out to those that are smarter than me. First, I upgraded my wife's phone and my ph

  • Is there a difference in terms of consolidating images & moving projects?

    I typically have large projects in aperture. They are around 25-35 gigs each. Now i edit all these images and from time to time work on them at different computers. So i export the project and then import it on other computers. I have noticed that wh

  • Adding Exchange account to official 2.1 OS

    I was on the beta 2.1 os for a few months, and did not have any issues with my EAS account. The morning of the upgrade, I was able to send and receive emails on my EAS account on my PB. I then upgraded to the official 2.1 os. After the upgrade my EAS