?
Solved

urgent display text from applet using jscript

Posted on 2003-03-06
6
Medium Priority
?
173 Views
Last Modified: 2010-04-01
I have an applet called myApplet with the property

String getLeaseName () { return leaseName; }

At the beginning of the page I need to write out this data

document.myApplet.getLeaseName();

what is the html to write this out
0
Comment
Question by:nick5454
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 8082739
try this:
<script>
var leaseName = document.MyApplet.getLeaseName();
document.write(leaseName);
</script>

CJ
0
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
ID: 8084542
That script is correct, but may fail due to it being executed before the applet has completed loading.

To ensure it works, instead have the applet call a js method. This will avoid the problem of the applet not having completed loading.

Use the following Java code to call a JS function:

JSObject window = JSObject.getWindow(applet);
window.call(functionname, args);

You will also need to include the MAYSCRIPT parameter in your applet tag.
0
 

Author Comment

by:nick5454
ID: 8145565
Isnt there a possibility of the user disabling MAYSCRIPT?
0
 
LVL 92

Expert Comment

by:objects
ID: 8145661
Not MAYSCRIPT directly, but they can disable both Java and Javascript.
0
 
LVL 35

Expert Comment

by:girionis
ID: 10040960
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points to objects

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
What's worse than having your data encrypted by ransomware? Getting attacked by a so-called "wiper," which simply destroys the data and offers you no hope of ever seeing it again.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question