473,320 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problem resizing a popup window (Permission Denied)

rizwan6feb
108 100+
Hi experts! I getting the following error message from Firefox, for the given code

Error: uncaught exception: Permission denied to get property Window.resizeTo
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. <script language="javascript">
  7.     var w;
  8.     var x=400; 
  9.     var y=80;
  10.     function showPopup(){
  11.         w=window.open('http://www.google.com',null,'width=400,height=80,scrollbars=0,menubar=0,toolbar=0,resizable=1');
  12.         resizeWindow();
  13.     }
  14.     function resizeWindow(){
  15.         w.resizeTo(x,y);
  16.         if(x>=700){
  17.             w.resizeTo(x,y);
  18.             y++;
  19.         }
  20.         else{
  21.             x++;
  22.         }
  23.         if(y<=300){
  24.             setTimeout("resizeWindow()",1);
  25.         }
  26.         else{
  27.             clearTimeout("resizeWindow()",1);
  28.         }
  29.     }
  30. </script>
  31. </head>
  32.  
  33. <body>
  34.     <input type="button" value="Show Popup" onclick="showPopup()" />
  35. </body>
  36. </html>
  37.  
May 22 '08 #1
4 3665
rnd me
427 Expert 256MB
you are not allowed (by a browser) to manipulate or even look at the window object of sites that don't match the main, address bar, current url.

you might be able to control the popup from the script using the w object, or by changing the window.open parameters.
May 22 '08 #2
rizwan6feb
108 100+
you are not allowed (by a browser) to manipulate or even look at the window object of sites that don't match the main, address bar, current url.

you might be able to control the popup from the script using the w object, or by changing the window.open parameters.
I have been already using the w object to resize the popup window.
May 23 '08 #3
acoder
16,027 Expert Mod 8TB
As rnd me mentioned, you can't access the window if it's from another domain.

Either make sure the site is from your domain or load it from your domain.
May 23 '08 #4
gits
5,390 Expert Mod 4TB
I have been already using the w object to resize the popup window.
as it was said correctly here ... the problem is not the resize action, the problem is a cross-domain-scripting issue ... just let me put an additional link for the OP here - have a look here ...

kind regards
May 24 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: riki | last post by:
Hi, i have a big problem...i'm using one jscript for resizing of all of my pics in popUp...in main html i'm having many little pics and clicking on them they open in popUp and resize to larger...
10
by: David McCulloch | last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it. Why not? (Don't ask why I simply did not open the window with the new size....my original problem was how to open a...
3
by: eft0 | last post by:
I have a big problem after I install SP2 in XP Box, some functions - window.resizeBy() - in my code, give a error like this: Access Denied. Some similar experience ?, any ideas what's...
2
by: maxrawson | last post by:
Greetings all: I have an asp.net application that is coded mainly in vb.net. I have successfully cut and pasted some javascript into my application that mimicks the datetime picker control in...
8
by: Captain Dondo | last post by:
I am using a popup window to show pictures. Each time the user clicks on a thumbnail in the mail HTML page, the popup either appears or reloads a new picture. Some pictures are portrait, and...
23
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
5
by: Jean Pierre Daviau | last post by:
I have disable my firewall, virus software, google pop up allowed, ie6 popp up checker disabled. Is there an other one? This script tels me : "Pop-up windows are blocked. Please disable your...
8
by: Grzegorz | last post by:
Hi! my problem: I open a pop-up window and try to refresh it contents every 30 seconds. the code below works in Firefox browser but in IE i get Permission Denied error. any suggestions how to...
2
by: Venkatesh | last post by:
Hello all, We have a micro site that is getting opened inside a popup window from some external main site (the domains of our microsite and main site are different) ... I need to support the...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.