Can't resize window launched from context menu

Discussion in 'Internet Explorer' started by Bruce C. Pippin, Jan 1, 2008.

  1. I tested the following on XP Service Pack 2 and Vista running IE 7.

    I am launching a local HTM file through the IE context menu. All goes
    according to plan except the resulting window is too large and cannot be
    resized.

    I tried launching it from a secondary file containing:

    <script type="text/javascript" defer>
    MyFile =
    window.open("MyFile.htm","MyFile","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,
    resizable=no, top=0, left=" + screen.width + ", width=200, height=80");
    </script>

    Great! The result was as expected but the first window remained open (and
    in the same predefined size)

    The window can’t seem to be controlled by “resizeto†or style sheets.

    What have I overlooked? Any ideas on how to resolve this issue? Are we
    stuck with a fixed size window now?
     
    Bruce C. Pippin, Jan 1, 2008
    #1
    1. Advertisements

  2. Bruce C. Pippin

    rob^_^ Guest

    Hi Bruce,

    Check your security zone settings for IE. "Allow script-initiated windows
    without size or position constraints"

    Regards.
     
    rob^_^, Jan 1, 2008
    #2
    1. Advertisements

  3. In IE, Tools | Internet Options | Advanced
    Scroll down to Security and click the box to "Allow active content to run in
    files on My Computer*".
    Click OK.
    Restart the Computer.
     
    Frank Saunders MS-MVP IE,OE/WM, Jan 1, 2008
    #3
  4. Rob wrote: “Check your security zone settings for IE. "Allow
    script-initiated windows without size or position constraints"

    No affect.

    Frank Sanders wrote: “…Allow active content to run in files on My Computer … “

    No affect.

    I tried both remedies on Windows XP Service Pack 2 with IE 6 and Vista with
    IE 7. No Affect.

    So, I am now operating back with the default values throughout IE. The HTM
    file (with script and activex controls) works perfectly … except for that
    window that sits itself in the center of the screen.

    To clarify my problem: The active content is working perfectly. The issue I
    am experiencing is very specific to the size of the window that appears after
    launching the HTM file though the IE context menu. If I launch exactly the
    same file directly from the file structure, it resizes as expected.

    To simplify troubleshooting for all you kind souls pulling out your brains
    with me (BTW Thanks). Go to:

    http://www.pippin.us
    Use any version of IE (of course)
    After entering the website, choose MEDIA and then SOFTWARE from the left
    hand menu.
    On the resulting page, choose “Agent PowerToy 2007†(documentation provided)
    Install it, Run it and you’ll see that the Microsoft Agent character reads
    the web page exactly has expected. What isn’t expected is that window in the
    center of the screen that can’t be moved or resized via code.
     
    Bruce C. Pippin, Jan 1, 2008
    #4
  5. Bruce C. Pippin

    rob^_^ Guest

    Hi Bruce,

    I misunderstood your question.

    This is YOUR custom context menu?

    From your window.open statement it looks like you want to open Myfile.htm in
    a modal window.


    Your registry entries for the menu item should look like

    [Default]=Myfile.htm
    Contexts={whatever}
    Flags=1 (dword)


    In myfile.htm the html tag attributes determine the size of the modal window
    to open. eg.

    <html style="width:800px;height:600px">

    Since it is a modal window it opens by default centered on the parent IE
    window.


    Regards.
     
    rob^_^, Jan 1, 2008
    #5
  6. Rob,

    Perfect! I'll get the update for the "Read it!" Microsoft Agent PowerToy
    2007 posted on my website before the day is over. http://www.pippin.us

    I previously tried applying the style to the body tag. Of course, it didn't
    work for the reason I now understand. Thanks so much for jump starting my
    brain this morning. :)

    Thanks to everyone else who also gave the issue thought.

    Bruce
     
    Bruce C. Pippin, Jan 1, 2008
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.