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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to open window without Minimize/Maximize/Close i.e "X" ?

Status
Not open for further replies.

mb22

Programmer
Sep 4, 2002
258
US
can anyone help with the JS syntax for opening a window so that the Minimize, Maximize and Close ("X") in the top right hand corner of the window ... is NOT available for the user to use to close the window .....

I am providing a close button on the ASP.NET form for them to use instead.

thanks
 
As far as I know, the only attributes of the new window are as follows:

Parameter Text Type Function
toolbar boolean display a toolbar
location boolean display the location text box
directories boolean display the special link buttons
status boolean display a status bar
menubar boolean display the menus at the top
of the window
scrollbars boolean display scrollbars
resizable boolean allow the window to be resized
width integer the width of the window
height integer the height of the window
top integer the top position of the window
left integer the left position of the window

Sorry I couldn't be of more help.
 
the only way I know of is to open the window in full screen then use javascript to resize the window. this way you will not have any of the common window's controls
 
Can the width and height be PERCENTAGE of the screen rather than hard-coded pixel sizes?
 
Haven't tested it, but...
Code:
var w = 630, h = 440; // default sizes
if (window.screen) {
  w = window.screen.availWidth * percent / 100;
  h = window.screen.availHeight * percent / 100;
}
resizeTo(w,h);

Adam
while(ignorance){perpetuate(violence,fear,hatred);life=life-1};
 
Although, newer versions of IE may not let you resize a window opened in kiosk/fullscreen mode. Worth a try though.

Adam
while(ignorance){perpetuate(violence,fear,hatred);life=life-1};
 
i'm not sure i want to use resize ...because even when the user sizes the window themselves,.... resize resets it again to what it is coded as ... instead of retaining the size that the user set themselves.

another issue, on my development box .. when the window first opens, the size is that of the ASP.NET form. however when i log in with a different profile on the same development box or on any other machine .. the ASP.Net form does not open at the "natural" size ... and the user has to resize all the time.

How can I make the form open with the size that is used to create it in the development environment?
 
Would it be easier to use the onunload event to do what your button does?

Adam
while(ignorance){perpetuate(violence,fear,hatred);life=life-1};
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top