Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create an "OK" button to close a browser.

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
0
0
MY
Hi all, anyone knows how to create a button "OK" to close the browser just like the alert message in Javascript? That means, the browser is opened and the user couldn't click on anywhere else except to press the OK button. Thanks.
 
hello

to close the browser, you do this:
<input type=&quot;button&quot; onclick=&quot;window.close()&quot;>

hui
 
You'll still be able to close the child window with the &quot;X&quot; icon in the top left of the window.

Is there a way that these icons and the whole top bar can be removed as you open the window? It is not listed as an attribute of the open() method, but has anybody developed a work-around?
 
not without being a trusted application. this is a security restriction. One alternative is to create a DHTML window. jared@aauser.com
 
ok a lied... in IE there is a workaround. if you size the new window to fullscreen ( i think its fullscreen=yes or something ) you can sue setsize to shrink it back to whatever size you want. this removes all the browser chrome.

check out for example jared@aauser.com
 
yeah, I agree with AndyB21. How do we remove the whole top bar. Anyway, thanks guys, but the problem really lies on how to create this child window in such away that the user couldn't proceed clicking anywhere else except for the OK button. Just like the alert messages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top