473,320 Members | 2,080 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.

Domain Access denied for window.open request

I try to open up a window with window.open in javascript. "domain.html"
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("domain.html","Print","menubar=yes,too lbar=no,scrollbars=yes,status=no,resizable=yes");
w.document.domain = 'domain.school.edu';
var message = SVGDoc.getElementById("rangeplot") ? "drawrange" : "";
var hd = crawl_down(1, document.documentElement, function(o){return
o.tagName=="HEAD"});
// alert('Plot window is opened');
var s = "<html>"+hd.outerHTML;
s +="<body onload='printing_only(event)'>";
s +=document.getElementById("plotmenustyle").outerHT ML;
s +="<div id='demor'
style='margin-top:10;margin-left:100'>"+pat_info()+"</div><div id='msg'
msg='"+message+"'></div>"+ftplt.outerHTML+"</body></html>";

w.document.write(s);
w.location.reload(false); //necessary to trigger onload event
}
Jul 23 '05 #1
2 6065


Wang, Jay wrote:
w.document.write(s);
w.location.reload(false); //necessary to trigger onload event


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

--

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

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:41***********************@newsread2.arcor-online.net...


Wang, Jay wrote:
w.document.write(s);
w.location.reload(false); //necessary to trigger onload event


Not really, I am sure if you properly call
w.document.open();
w.document.write(s);
w.document.close();
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
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...
6
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...
3
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...
12
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...
2
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...
2
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...
6
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...
1
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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)...
1
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...
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.