Solved

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

Posted on 1997-03-13
1
207 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now