Solved

HTML close button on top of applet...

Posted on 2001-08-16
9
225 Views
Last Modified: 2012-06-22
Can anyone tell me if so, and how, I can add an HTML close button to cover a small portion of the bottom corner of my applet?

The applet takes up the fullscreen, and I would like to include a close button so users know how to close the window.  Most people do not know about the Alt+F4 keystroke combination to close a full screen window <one without the taskbar or title bar>.

Thanks,

Paul
0
Comment
Question by:madforplaid
9 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6391681
As far as I know an applet cannot close the browser window.
Myabe you can do it with some Javascript, how does the window get to full screen mode in the 1st place.
Why not just put some instructions on the page on how to close the window.
0
 

Expert Comment

by:rac13
ID: 6391826
If not u can include frames into it. The top frame consist of your html close button and the bottom frame would consist your applets.
0
 
LVL 1

Expert Comment

by:my_moon011000
ID: 6392375
Maybe this will work: you can have a close function (button) in your applet, where you try to open a new html page with this code:

getAppletContext().showDocument(new URL("close.html"));

and close.html have javascript code for closing this window:

<html>
<body onload="javascript:window.close();">
</body>
</html>

Hope it works!
0
 
LVL 1

Author Comment

by:madforplaid
ID: 6395770
Thank you all for getting back to me.

Again, I'd like to add an HTML close button to cover a small portion of the bottom corner of my applet.  The purpose of the close button is so users know how to close the window since the applet and the HTML window fills up the full height of the screen (including the title bar).

If interested, I have uploaded several image files to review for testing purposes.

First, view the following image:  http://www.mindspring.com/~lkkl/appletWindowTaskbar.jpg

This image is when one has the taskbar set to 'Always on Top'.  You'll see that the applet doesn't quite fit within the window flush; too much white space is showing.  I even commented off the <p>, <table>, etc. tags within the HTML to try to get it to work.  I then adjusted the width and height settings accordingly in the ASP pages that generate the params to the applet to make it as flush to the border as possible, but I still have the white space surrounding the applet itself.  Any ideas on how I can get the applet to open flush within the new window?

For reference, the following two links show the text code of the ASP files used to generate the applet.  

This ASP page is where one selects an airline and then a flight number after the select drop-down box has been populated:  http://www.mindspring.com/~lkkl/trackerform_test.asp.txt  This ASP page displays the applet that is shown in the other image links:  http://www.mindspring.com/~lkkl/flighttracker_test.asp.txt

Next, view this image of the flighttracker_test.asp page:  http://www.mindspring.com/~lkkl/appletWindowNoTaskbar.jpg

This image is when one does not set the 'Always on Top' feature.  It clearly shows the X close that I would like to appear within the applet!  Ideally, I would like the close button to appear 'on top' of the applet, but when I adjust the height and width params of the button in relation to the applet, it disappears underneath the applet.

To see an example of how I'd like the applet to look like, view the last image that I doctored using Photoshop:  http://www.mindspring.com/~lkkl/closeButtonApplet.jpg

--------------------

I might have to adjust the dimensions of the map images to fit in the new window, but it would be great if I could make the X button appear as it does in the closeButtonApplet.jpg image.

Any other ideas on how to get this to function is much appreciated.

Thanks,

Paul

PS  I am also increasing the points to 50!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:my_moon011000
ID: 6396039
Well, I'm not sure if it is possible to do, maybe with layers, but I have no idea if it would work. Why not place this button directly on the applet surface? You could place it on top, or as you show it in closeButtonApplet.jpg.
0
 
LVL 1

Author Comment

by:madforplaid
ID: 6397837
my_moon,

I'll give the layer or iframe idea a try...

The X Close Button in closeButtonApplet.jpg was manipulated using Photoshop.

Do you know how I can place it on top using HTML/JS or within the .java code?

Thanks,

Paul
0
 
LVL 1

Accepted Solution

by:
my_moon011000 earned 50 total points
ID: 6405769
I tried to do it with layers - no good. So how about positioning the button on the top "white space" above the applet? Try with zeros at left and top of the button and see what happens.

Including the button in the applet is elementary java programming.
0
 

Expert Comment

by:CleanupPing
ID: 9061853
madforplaid:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 9332408
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for my_moon

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Venabili
EE Cleanup Volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse compiler vs Installed JREs option 3 77
Cipher Configuration on Apache HTTPD 4 53
ForLoop Example 3 40
more than one jdk and one jre 1 34
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

863 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

18 Experts available now in Live!

Get 1:1 Help Now