473,805 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Domain Access denied for window.open request

I try to open up a window with window.open in javascript. "domain.htm l"
contains domain information 'domain.school. edu'. The "Access denied" problem
happens when document.write is trying to put variable s into the new window.
Sometimes, it writes successfully, while other times the popup error is
"access denied". How to solve this problem? thanks

_______________ _____________

function setup(){
var w =
window.open("do main.html","Pri nt","menubar=ye s,toolbar=no,sc rollbars=yes,st atus=no,resizab le=yes");
w.document.doma in = 'domain.school. edu';
var message = SVGDoc.getEleme ntById("rangepl ot") ? "drawrange" : "";
var hd = crawl_down(1, document.docume ntElement, function(o){ret urn
o.tagName=="HEA D"});
// alert('Plot window is opened');
var s = "<html>"+hd.out erHTML;
s +="<body onload='printin g_only(event)'> ";
s +=document.getE lementById("plo tmenustyle").ou terHTML;
s +="<div id='demor'
style='margin-top:10;margin-left:100'>"+pat _info()+"</div><div id='msg'
msg='"+message+ "'></div>"+ftplt.out erHTML+"</body></html>";

w.document.writ e(s);
w.location.relo ad(false); //necessary to trigger onload event
}
Jul 23 '05 #1
2 6090


Wang, Jay wrote:
w.document.writ e(s);
w.location.relo ad(false); //necessary to trigger onload event


Not really, I am sure if you properly call
w.document.open ();
w.document.writ e(s);
w.document.clos e();
then the load event is fired, no need to call reload.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

"Martin Honnen" <ma*******@yaho o.de> wrote in message
news:41******** *************** @newsread2.arco r-online.net...


Wang, Jay wrote:
w.document.writ e(s);
w.location.relo ad(false); //necessary to trigger onload event


Not really, I am sure if you properly call
w.document.open ();
w.document.writ e(s);
w.document.clos e();
then the load event is fired, no need to call reload.


reload setting to false is needed for my program to make onload event work.
Even after I commented that line out, the access denied error still shows
up.

thanks.

Jay
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3304
by: George Hester | last post by:
Please take a look at this google artcle: http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9 The op was having trouble with access denied using resizeTo. I am having the same issue but the explanations in this article don't seem to apply here. I am not trying to resize a window with content from a different server. This issue lies here. What I do is make a popup...
6
467
by: Bob | last post by:
Having trouble getting started. I created an instance of MSDE called VSDOTNET on a computer with the name of sysdev. Using MS SQL Web Adminstrator I created a database called temp with a table called customer. In Visual Studio .NET I can see and access the data in the table. The dataconnection is called sysdev\vsdotnet\temp.dbo
3
6133
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
12
3105
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty asp editing (like I used to be able to do with 2K/IIS5) where I use VS.NET, open an asp file, make changes, save and refresh my browser. Problem is that I get an Access is Denied error when I try to save the file and then the file gets wiped on...
2
22655
by: johkar | last post by:
I am getting an Access denied error when I write to a new window. The situation and code are outlined below. I am setting the domain in the main window. The problem is that the window I am popping up never gets it domain set, even though I have coded it to be the same as the main window. I get an Access Denied errror. Four different domains: *localhost.mycompany.com *test.mycompany.com *pilot.mycompany.com
2
4376
by: nte | last post by:
Hi. I have a site where users can open their profiles and provide some personal data. On a user's button click, I want to open a new window and show some page that is hosted on another domain (I don't have any access to the code on another domain).
6
3853
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I'm running VS 2003/ASP.NET 1.1.4322.0 on XP SP2 All of a sudden I started to getting... "Error while trying to run project: Unable to start debugging on the web server. Server side-error occurred on sending debug HTTP request. Make sure the server is operating correctly. Verify there is no syntax errors in the web.config by doing a debug.start without debugging. You may also want to refer to the ASP.NET and ATL Server debugging...
1
6517
by: raviviswanathan.81 | last post by:
Hello, So we have a webmaster who sets document.domain to some domain. After that, we try to create and inject text inside an iframe by getting the iframeID.contentDocument (or iframeID.contentWindow.document for MSIE). This results in an 'access denied' issue in MSIE (No problem in Mozilla). Note that if there is document.domain initialization before this iframe creation/content injection, there is no problem and all works well.
0
9718
marktang
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...
0
9596
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,...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10369
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
tracyyun
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...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
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
3
3008
bsmnconsultancy
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...

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.