[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 243
  • Last Modified:

HTML close button on top of applet...

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
madforplaid
Asked:
madforplaid
1 Solution
 
objectsCommented:
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
 
rac13Commented:
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
 
my_moon011000Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
madforplaidAuthor Commented:
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
 
my_moon011000Commented:
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
 
madforplaidAuthor Commented:
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
 
my_moon011000Commented:
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
 
CleanupPingCommented:
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
 
VenabiliCommented:
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now