Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window events in HTA

    I have problems with HTA =(

    Update.

    I have *.hta file which loads external html page into <iframe>. For now hta-file is about 240 K and is loaded very slowly. So at the begining of script there were following lines:

    window.resizeTo(1,1);
    window.moveTo(5000,5000);

    and coreesponding lines to move window to the center of screen -some naive trick to avoid appearence of blank window.

    Sometimes we have had an "Access denied" error at these lines in windows XP. We have never had them in another OSs. We got similar errors every time then clicked left mouse button on the moving window, but I have doubt that it was a mouseclick in situation described =)

    Why we have "Access denied" errors sometimes when resizing or moving the HTA window ?
    Last edited by oinas; 09-16-2005 at 12:29 PM. Reason: I define more exactly the cause of problem

  • #2
    New Coder
    Join Date
    Sep 2005
    Location
    Ottawa, ON
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    moving a window off the screen (beyond the borders) is actually a security flaw that some sleazier pop-up adds used to hide a window from unsespecting users, allowing them to contually spawn new pop-ups after the user left the original page. Microsoft removed this ability in Javascript as a result.

    Instead of silently ignoring this call (like Netscape) it now throws an error.

    Also note that windows cannot be created with widths or heights less than 100 pixels. anything less will be ignored and replaced with 100.

  • #3
    New to the CF scene
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it isn't a pop-up.It's just an application which I don't want to see before it's loaded

    well, if no way around I can accept white window.
    But why does moving it back to the screen fail? And why it fails only sometimes?

    Also note that windows cannot be created with widths or heights less than 100 pixels. anything less will be ignored and replaced with 100.
    erm, I've just tried to create 10*10 window, and it does work!

  • #4
    New Coder
    Join Date
    Sep 2005
    Location
    Ottawa, ON
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, maybe that's different for hta apps. I don't know.

    but any window isn't allowed to move off the screen, as far as I know.

  • #5
    Regular Coder
    Join Date
    Aug 2005
    Posts
    282
    Thanks
    0
    Thanked 0 Times in 0 Posts
    check out this
    Access Denied when trying to move Internet Explorer
    When you try to move or resize a window on a Microsoft Windows Server 2003 Service Pack 1-based or Microsoft Windows XP Service Pack 2-based computer, you may receive an error message that is similar to the following:
    Access Denied
    This problem occurs when you use a drag operation to move or to resize a Microsoft Internet Explorer window or the window of another application.
    you can wrap them with try{}catch(ignore){} to prevent the error.
    but would not do the method if it occurs.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •