Solved

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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
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

751 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