Solved

Anchor around applet. How to jump to HREF when someone clicks on the applet?

Posted on 1997-03-13
1
210 Views
Last Modified: 2008-03-06
If the code on my HTML page looks something like

<A HREF="xpto.html">
<APPLET
   ...
</APPLET>
</A>

then how can I code my applet so that when someone clicks on it, they go to the xpto.html page? I don't want to code the jump-to-URL in the applet, I want the browser to do it. How can this be done? I'm using MSVisual J++.
0
Comment
Question by:midas
1 Comment
 
LVL 2

Accepted Solution

by:
majkl earned 50 total points
ID: 1219163
Try this :
 URL add
 try
             {
                add = new URL("http://my.machine/File_with_applet.html#xpto.html");
             }
           catch (MalformedURLException e) {}

           getAppletContext().showDocument( add);

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to convert String matching to regex in java 4 51
jboss 7.1 start up error 1 41
Java syntax, or is it Selenium 6 30
Java class and jar 3 25
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question