The Artima Developer Community
Sponsored Link

Java Answers Forum
Passing applet variables to html document

2 replies on 1 page. Most recent reply: Apr 29, 2002 8:12 AM by Mariam

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Mariam

Posts: 4
Nickname: insomnia
Registered: Apr, 2002

Passing applet variables to html document Posted: Apr 28, 2002 3:34 PM
Reply to this message Reply
Advertisement
Hello...

I am writing an applet and my problem is that i want to pass a variable the applet uses to a new html document.
I am using getAppletContext().showDocument( new URL...
and i need to get the contents of the variable that is created in the calling applet.
How can this be done?

Thanks in andvance!!


Pavan Kumar Keely

Posts: 7
Nickname: pavan
Registered: Mar, 2002

Re: Passing applet variables to html document Posted: Apr 29, 2002 3:28 AM
Reply to this message Reply
> Hello...
>
> I am writing an applet and my problem is that i want
> to pass a variable the applet uses to a new html
> document.
> I am using getAppletContext().showDocument( new
> URL...
> and i need to get the contents of the variable that
> is created in the calling applet.
> How can this be done?
>
> Thanks in andvance!!

hi Mariam...

You want to retrieve the value of a variable used by an applet in a HTML document....right ??/
If this is your problem then you can do this by using the Java Script. The Java script will invike a method of applet which will return the values of the "variable".....the method can be called something like this....
document.appletName.methodName()...

If this is not your question .....or have any doubt....please feel free to contact me at keelypavan@hotmail.com

bye

Mariam

Posts: 4
Nickname: insomnia
Registered: Apr, 2002

Re: Passing applet variables to html document Posted: Apr 29, 2002 8:12 AM
Reply to this message Reply
Thanks Pavan for the advise.

I tried your solution but i must be doing something wrong because i get this error: 'document.myapplet' is null or not an object.

Is the problem inside the javascript or the method i call from the applet?


Bye for now...

Flat View: This topic has 2 replies on 1 page
Topic: Writing to a file Previous Topic   Next Topic Topic: About Multidimensional Arrays

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use