Solved

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

Posted on 1997-03-13
1
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

627 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