aspose file tools
The moose likes Applets and the fly likes pass parameter to applet in another window Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "pass parameter to applet in another window" Watch "pass parameter to applet in another window" New topic
Author

pass parameter to applet in another window

Chad Clites
Ranch Hand

Joined: Aug 16, 2005
Posts: 134
Is it possible to load an applet in a new window, and pass it a (dynamic) parameter? I can do it using javascript if everything is in the same window, but I can't figure out if it is possible to pass parameters to a different window. I am trying to add some functionality to a pre-existing web site, and my only option (that I an think of) is to use javascript. I can't tinker with the html without causing huge problems.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35220
    
    7
You could try appending a parameter to the URL of the page that contains the applet, and then read that via "getDocumentBase" in the applet. I think that should return the full URL of the page, including the parameter.


Android appsImageJ pluginsJava web charts
Chad Clites
Ranch Hand

Joined: Aug 16, 2005
Posts: 134
I did finally find a javascript method. In my new window, I use document.opener.my_element.my_value. That gets the element I need from the parent window. I've been trying to figure this out for two weeks, and it turned out to be a simple one-line piece of code. :roll:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: pass parameter to applet in another window
 
Similar Threads
How to disable browser’s address window?
detecting browser name/version from an Applet
Make an alt-tab fonction in javascript
pass parameter from jsp to jsp
Very tricky question