[4387] in java-interest

home help back first fref pref prev next nref lref last post

Re: Location URL

daemon@ATHENA.MIT.EDU (Brian D. Elliott)
Thu Dec 21 15:30:45 1995

Date: Thu, 21 Dec 1995 10:35:02 -0800 (PST)
From: "Brian D. Elliott" <belliott@world.nad.northrop.com>
To: java-interest@java.sun.com
In-Reply-To: <199512210024.QAA11511@java.sun.com>


> Does anyone know how to have the result of a java List Selection (which I
> then convert into a URL) be sent to Netscape as a user selected HREF?
> In others words, I want the user to make a selection from a List box from
> awt, and have Netscape go to a URL based on the selection. Thanks! Erik.

Give this a shot:

         try {
            myURL = new URL(getDocumentBase(), "http:// ..list string");
         } catch (MalformedURLException e) {
              e.printStackTrace();
         }
         getAppletContext().showDocument(myURL);

The showDocument should cause Netscape to go to the URL.

Brian

=========================================================================
Brian Elliott                          | 310-948-7038
Northrop Grumman Corp.                 |
belliott@world.nad.northrop.com        |
=========================================================================

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post