Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-16-2005, 08:00 AM   PM User | #1
oinas
New to the CF scene

 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
oinas is an unknown quantity at this point
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 11:29 AM.. Reason: I define more exactly the cause of problem
oinas is offline   Reply With Quote
Old 09-16-2005, 02:45 PM   PM User | #2
Canuck WebGeek
New Coder

 
Join Date: Sep 2005
Location: Ottawa, ON
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Canuck WebGeek is an unknown quantity at this point
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.
Canuck WebGeek is offline   Reply With Quote
Old 09-16-2005, 03:24 PM   PM User | #3
oinas
New to the CF scene

 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
oinas is an unknown quantity at this point
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?

Quote:
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!
oinas is offline   Reply With Quote
Old 09-16-2005, 03:28 PM   PM User | #4
Canuck WebGeek
New Coder

 
Join Date: Sep 2005
Location: Ottawa, ON
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Canuck WebGeek is an unknown quantity at this point
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.
Canuck WebGeek is offline   Reply With Quote
Old 09-16-2005, 05:31 PM   PM User | #5
KC-Luck
Regular Coder

 
Join Date: Aug 2005
Posts: 282
Thanks: 0
Thanked 0 Times in 0 Posts
KC-Luck is an unknown quantity at this point
check out this
Access Denied when trying to move Internet Explorer
Quote:
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.
KC-Luck is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:28 AM.


Advertisement
Log in to turn off these ads.