/    Sign up×
Community /Pin to ProfileBookmark

Problem with a script on Package object

Hi every body!

The following JavaScript script represent a function that is supposed to create a dialog box in Java language as an example given in Netscape documentation, but it does not work on ns7.1

1- Could some one please tell me what is wrong with it?
2- What is the counterpart of such an object that work for ie6?

Thanks indeed in anticipation.

[code=php]
<SCRIPT type= “text/javascript”>
<!–
function EnshiÁ(){
theOwner = new Packages.java.awt.Frame();
THEWIND = new Packages.java.awt.Dialog(theOwner);
THEWIND.setSize(350,200);
THEWIND.setTitle(“Hello, World”);
THEWIND.setVisible(true);
}
EnshiÁ();
// –>
</SCRIPT>
[/code]

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanJun 24.2004 — II'm not shure about the code but, I do not think that Á is a valid character in Javascript to make functions...

[Checked no, its not]
Copy linkTweet thisAlerts:
@Khalid_AliJun 24.2004 — don't see anything wrong unless that your browser is configured with right JRE.

Second there si no compatible Java code that will work in this manner in IE

In addition to all of the above,I have found that direct access to java's implementation in NS(or mozilla for that matter) could be allot better.
Copy linkTweet thisAlerts:
@Lotfi_AbdolhalauthorJun 25.2004 — Thank you very much indeed gentlemen,

Khalid Ali and Ryan Jones(sciguyryan)!

I would like to confirm to Dear Ryan that the letter you pointed out thereto is definitly valid.

As for the JRE configuration on the browser, Dear Ali, if it means enabling Java, Java is aready enabled in my browser and the script still doesn't run; if it means something else, what is it please, and how could I put it right?
Copy linkTweet thisAlerts:
@sciguyryanJun 25.2004 — As far as the script goes it is perfictly correct.

According to Danny Goodmans "Javascript Bible Gold Edition" and, I quote:


"Only alphanumerical characters may be used in variable and function names, failure to comply to this rule can cause a script to fail."
[/quote]
Copy linkTweet thisAlerts:
@Lotfi_AbdolhalauthorJun 26.2004 — Hi Dear Ryan Jones!

With respect to Danny's quote, I used to follow such a rule (adding a character of this sort) to tens of my scripts and they work. Furthermore, I tried the same script once again eleminating that strange character but still the script doesn't run on ns7.1

Thanks.
Copy linkTweet thisAlerts:
@sciguyryanJun 26.2004 — In that case I will continue my research.
×

Success!

Help @Lotfi_Abdolhal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...