Solved

Make current window resizable

Posted on 2004-08-20
25
2,207 Views
Last Modified: 2007-12-19
I want to make the current window, which is not resizable, resizable. How can I do this?
0
Comment
Question by:ch0c
  • 6
  • 5
  • 5
  • +2
25 Comments
 
LVL 14

Expert Comment

by:ziffgone
ID: 11857161
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
 
LVL 1

Author Comment

by:ch0c
ID: 11857243
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
 
LVL 14

Expert Comment

by:ziffgone
ID: 11857576
window.open('/page.html','resizable=yes');

Like so.

Regards...
0
 
LVL 14

Expert Comment

by:ziffgone
ID: 11857577
Of course, I'm assuming you are using the window.open method, no?

Regards...
0
 
LVL 1

Author Comment

by:ch0c
ID: 11857653
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
 
LVL 13

Expert Comment

by:davidlars99
ID: 11860269
<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
 
LVL 1

Author Comment

by:ch0c
ID: 11872799
This doesn't work in any of the browsers I tested. Is there some other way?
0
 
LVL 1

Accepted Solution

by:
BillyBoJimBob earned 50 total points
ID: 11874440
Change test.html to the file name you want to re-open.
0
 
LVL 1

Expert Comment

by:BillyBoJimBob
ID: 11896701
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
 
LVL 1

Author Comment

by:ch0c
ID: 11898223
Thanks!

Sorry for the late reply.
0
 
LVL 10

Expert Comment

by:Bustarooms
ID: 11914547
BillBo, that code is not allowed on EE as it is an IE hack.  i've asked CS to delete your posting
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 1

Expert Comment

by:BillyBoJimBob
ID: 11917148
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
 
LVL 1

Expert Comment

by:BillyBoJimBob
ID: 11917236
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
 
LVL 10

Expert Comment

by:Bustarooms
ID: 11917295
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
 
LVL 13

Expert Comment

by:davidlars99
ID: 11917306
CetusMOD could you please explain what this means?

>it could be abused by malicious coders.
0
 
LVL 1

Expert Comment

by:BillyBoJimBob
ID: 11917422
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
 
LVL 10

Expert Comment

by:Bustarooms
ID: 11917460
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
 
LVL 1

Expert Comment

by:BillyBoJimBob
ID: 11917803
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
 
LVL 1

Author Comment

by:ch0c
ID: 11918320
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
 
LVL 14

Expert Comment

by:ziffgone
ID: 11920858
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
 
LVL 13

Expert Comment

by:davidlars99
ID: 11920975
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
 
LVL 14

Expert Comment

by:ziffgone
ID: 11921096
"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
 
LVL 10

Expert Comment

by:Bustarooms
ID: 11930384
>> 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now