• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2219
  • Last Modified:

Make current window resizable

I want to make the current window, which is not resizable, resizable. How can I do this?
0
ch0c
Asked:
ch0c
  • 6
  • 5
  • 5
  • +2
1 Solution
 
ziffgoneCommented:
Click on the little double window icon at the top right corner, (the one in between the "_" icon and the "X" icon). The current window then becomes resizable.

May need more info if that's not what your after.

Regards...
0
 
ch0cAuthor Commented:
Sorry for not being completely clear. This is a JavaScript question. One window spawns another unresizable window containing HTML code. I want the spawned window to become resizable.
0
 
ziffgoneCommented:
window.open('/page.html','resizable=yes');

Like so.

Regards...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ziffgoneCommented:
Of course, I'm assuming you are using the window.open method, no?

Regards...
0
 
ch0cAuthor Commented:
No, sorry for the confusion. I already HAVE an open window. But I want to make it resizable from the spawned window itself, not the parent window.
0
 
davidlars99Commented:
<script language="Javascript">
self.status=0;
self.toolbar=0;
self.scrollbars=1;
self.resizable=1;
self.screenX=0;
self.screenY=0;
self.width=800;
self.height=800;
self.top=0;
self.left=0;

</script>

cheers!
 dave
0
 
ch0cAuthor Commented:
This doesn't work in any of the browsers I tested. Is there some other way?
0
 
BillyBoJimBobCommented:
Change test.html to the file name you want to re-open.
0
 
BillyBoJimBobCommented:
ch0c,

Adjust the code in the message "Date: 08/23/2004 01:55PM MDT" to work in your child window... it basically will open a resizable copy of itself and then close the non-resizable popup.
0
 
ch0cAuthor Commented:
Thanks!

Sorry for the late reply.
0
 
BustaroomsCommented:
BillBo, that code is not allowed on EE as it is an IE hack.  i've asked CS to delete your posting
0
 
BillyBoJimBobCommented:
Sorry guys, I had no idea it was a hack.  I just knew it worked with my client-side-only javascript calculator.  It was a solution provided me at some other forum.
0
 
BillyBoJimBobCommented:
CetusMOD, At best, I am a total newbie.  

Does that mean I should remove that code from my calculator?

What ramifications will it have on browsers/pc's that use this code?
0
 
BustaroomsCommented:
BillBoJimBob,

first off, it will only work in IE.  If you try your calculator in Mozilla or Netscape, it will not be able to close the main window.
0
 
davidlars99Commented:
CetusMOD could you please explain what this means?

>it could be abused by malicious coders.
0
 
BillyBoJimBobCommented:
Bustarooms:

You are right, this code will only work in IE.  It has hampered my attempts to get a Mozilla/Netscape/Mac/Linux version of my calculator working.  It's intent was to maximize the full screen mode window to whatever resolution size the end user had.  It does open an "opener" page that opens the main app in the maxed window.  The opener(parent) is closed by the app(child). It doesn't work on all pcs with IE either, but I have a link to the child window without the Maxhack available.  Other than the fact that it is an "evil" set of code, it works great for my app.  Until this thread notified me it was "sick and wrong" to use such code, I really had no clue. (No, I'm not blonde.)
0
 
BustaroomsCommented:
i wouldn't say its wrong to use the code...it all depends on your purposes.  it's just wrong to post it here b/c EE doesn't want to faciliate the spearding of the code as it is a hack

use it at your leisure
0
 
BillyBoJimBobCommented:
It provides "seamless" Maximization of the program's screens.  It could have been written in any other code, but javascript/html feels easier to deal with and debug.  This is an offline program.  It was designed to run from a floppy, hard disk or cd.

How can I know if I'm submitting "hack" code as a solution on EE?
0
 
ch0cAuthor Commented:
Does this mean I should accept somebody else's answer?

BillyBoJimBob's solution worked well for me, and I think he should get at least some credit for it.
0
 
ziffgoneCommented:
No ch0c, if you wish to use the code, and it answered your question, feel free to accept BillyBoJimBob's answer as the correct answer. As stated, the code is considered a hack and non-postable here at EE, but it is not illegal to use for yourself. The only thing with such hacks is to remember to be considerate to your users/viewers of your webpage.

For example, if I had spent hours searching through google for something, and still wished to use my search more, and I came across a site that closed my main browser, I'd be a little furious as I would have to redo my search on google and peruse all of the links I had already visited to get back up to speed. It'd be a little annoying. Also, ALWAYS make sure the new window the user is situated in has a way to close it, or navigate away from it.

@BillyBoJimBob:

"How can I know if I'm submitting "hack" code as a solution on EE?" - Basically, you won't until told so by a Mod or someone else. If in doubt though, Billy, just post it in community support first, before posting it in the Q, with a title like "Would this javascript code be considered a Hack?". I assure you it would be looked at quickly and concisely and the Mod would let you know immediately if it was. It would then be in a place where it would be deleted before too many eyes had a chance to view it.

@Davidlars99:

"it could be abused by malicious coders." - As an example, many porno sites use this sort of thing. They will trap the viewer inside a Fullscreen window with no way out except where they want the user to go and most often popping a b'zillion windows with more horrifying content. I don't doubt that about 90% of computer users out there don't know they can hit "ALT+F4" to close a window. So here they are, having opened what looked to be an innocent link in an e-mail, trapped with a full screen of pornographic content, a thousand more windows popping up, panicking, shouting for their kids to close their eyes, and no matter how many windows they close, the main window popping them is out of their control and popping more. Anyway, I'm sure you get the pic.

Take care folks,

Regards....
0
 
davidlars99Commented:
yes I agree, but I think it depends how you plan to use it right? if for good then it wouldn't be a hack I think... -:)

> popping a b'zillion windows with more horrifying content.
they don't look like horrifying to me at all... -:) -;)

0
 
ziffgoneCommented:
"they don't look like horrifying to me at all... -:) -;)" - GRIN!!

It definitely depends on how you use it. There are many situations that certainly allow for it. Just can't post it here. :P

Regards..
0
 
BustaroomsCommented:
>> if for good then it wouldn't be a hack I think... -:)

one other thing to consider is that it will only work in IE because it is a bug in the browser.  try the same on mozilla and it wont work for you
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 5
  • 5
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now