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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
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: 39547
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
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:
 
wood burning stoves
 
subject: pass parameter to applet in another window
 
Similar Threads
How to disable browser’s address window?
Make an alt-tab fonction in javascript
Very tricky question
pass parameter from jsp to jsp
detecting browser name/version from an Applet