Discussion Locked

Closing of IE or Netscape Browser

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I am looking for a sound solution on the following:
When we launch IE or Netscape, we have the 3 buttons Mimimize, Maximize and Cancel/Close.
When my page gets launched i want to make the
Cancel/Close button greyed out, and the user
should select only my Button or link to close the page.
How can i do it programmatically.
Thanks.

3 replies

by jay eckles

You're probably going to want to use an HTA (HTML Application). This only works with Windows, or perhaps other platforms that have IE installed. With HTA you have *total* control of the window, you can even launch it with no title bar at all (and thus no min/max/close controls on the window).

To activate or inactivate (i.e., gray out) a button, you use javascript to set a property of the button object:

document.form.element.disabled = true ;

You can use the onLoad event of the body to set the initial state of the buttons and other interface elements, and onUnLoad to do any last-second cleanup. Virtually any user interaction has some sort of event associated with it that you can use as well.

Let me know if you need more detail. Also, if you are ever looking to outsource work like this, visit my website at www.jayeckles.com.

Good luck!

This discussion is closed to new replies.