Hi experts! I getting the following error message from Firefox, for the given code
Error: uncaught exception: Permission denied to get property Window.resizeTo -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
<title>Untitled Document</title>
-
<script language="javascript">
-
var w;
-
var x=400;
-
var y=80;
-
function showPopup(){
-
w=window.open('http://www.google.com',null,'width=400,height=80,scrollbars=0,menubar=0,toolbar=0,resizable=1');
-
resizeWindow();
-
}
-
function resizeWindow(){
-
w.resizeTo(x,y);
-
if(x>=700){
-
w.resizeTo(x,y);
-
y++;
-
}
-
else{
-
x++;
-
}
-
if(y<=300){
-
setTimeout("resizeWindow()",1);
-
}
-
else{
-
clearTimeout("resizeWindow()",1);
-
}
-
}
-
</script>
-
</head>
-
-
<body>
-
<input type="button" value="Show Popup" onclick="showPopup()" />
-
</body>
-
</html>
-
4 3695 rnd me 427
Recognized Expert Contributor
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.
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.
acoder 16,027
Recognized Expert Moderator MVP
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.
gits 5,390
Recognized Expert Moderator Expert
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
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 version of the same pic.
now, it works fine and sometimes when i click on little one it doesn't
resize well...
this is the code:
main.html
|
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 new window with maximized dimensions!)
FYI, I uploaded the same code to:
http://tosasoft.com/test/open.htm
========================================
|
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 happening here ?,
Thanks in advanced.
Esteban.
|
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 vb. I wanted to try to use that
same code for another popup style window that displays a list of
airport codes in a datagrid. The desired results would be that when an
airport code (the datagrid's key field) is clicked the value would
write back...
|
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 some are landscape. I build the popup
html dynamically. How can I a) resize the popup window to fit the image,
and b) pop it to the forefront once the new picture is loaded?
Thanks.
| |
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 align="center">
|
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 popup blocker in order to
use the site.".
|
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 make it work in IE?
Regards,
Grzegorz
|
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 following functionality: After the user is done
surfing the pages on our site and user clicks the close hyperlink
(present on top of all of our webpages), the opener window's location
needs to be reset to some given URL ....
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |