473,395 Members | 1,936 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,395 software developers and data experts.

about:blank?

I've cobbled together a script that should load a picture in a new,
automatically sized window. Because the image.height and image.width may be
0 if I test them right away, I use setTimeout to loop until they are both
not zero. I've run into two problems:

- In IE, the script doesn't seem to loop. If the picture isn't already
cached, nothing appears to happen; if it is in cache, the window (rather
slowly) opens up.

- In Netscape, the script also doesn't seem to loop properly. (Yes, I'll
revisit all of that.) However, even if the picture does pop up I get the
following message in the js console: Security Error: Content at
http://www.uahc.org/ct/ct015/photos2.html may not load data from
about:blank.

That last bit really puzzles me.

--
Regards,

Jerry Schwartz
Jul 23 '05 #1
5 7101
Jerry Schwartz wrote:
I've cobbled together a script that should load a picture in a new,
automatically sized window. Because the image.height and image.width may be
0 if I test them right away, I use setTimeout to loop until they are both
not zero. I've run into two problems:

- In IE, the script doesn't seem to loop. If the picture isn't already
cached, nothing appears to happen; if it is in cache, the window (rather
slowly) opens up.

- In Netscape, the script also doesn't seem to loop properly. (Yes, I'll
revisit all of that.) However, even if the picture does pop up I get the
following message in the js console: Security Error: Content at
http://www.uahc.org/ct/ct015/photos2.html may not load data from
about:blank.

That last bit really puzzles me.


Its a cross-domain security issue. The reason is because about:blank is
not in the same domain as www.uahc.org so you get the security warning.
If you just want a blank page you can read/write to, create a blank.html
that is nothing but a blank page, load that page instead, and then you
can script it without the security warnings.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2
Ivo
"Jerry Schwartz" <je***********@comfortable.com> wrote in message
news:Np********************@comcast.com...
- In Netscape, the script also doesn't seem to loop properly. (Yes, I'll
revisit all of that.) However, even if the picture does pop up I get the
following message in the js console: Security Error: Content at
http://www.uahc.org/ct/ct015/photos2.html may not load data from
about:blank.

That last bit really puzzles me.


Cross-domain security rescrictions apply. The browser considers
http://ww.uahc.org and about: to be different domains, two different
protocols even, and refuses to communicate between them.
i guess you open the popup with
open('about:blank',...
Try
open('',...
instead.
HTH
Ivo
Jul 23 '05 #3
Ivo
"Jerry Schwartz" wrote
even if the picture does pop up I get the
following message in the js console: Security Error: Content at
http://www.uahc.org/ct/ct015/photos2.html may not load data from
about:blank.

That last bit really puzzles me.


Cross-domain security rescrictions apply. The browser considers
http://ww.uahc.org and about: to be different domains, two different
protocols even, and refuses to communicate between them.
i guess you open the popup with
open('about:blank',...
Try
open('',...
instead.
HTH
Ivo


Jul 23 '05 #4
I really shouldn't post when I'm tired... I'm not, myself, referenced
"about:blank" at all; but I think there's another bit of script in the page
(I inherited this web site) that might have been put there by FrontPage. I
need to look at it more thoroughly, and post a bit more intelligently.

--
Regards,

Jerry Schwartz
"Ivo" <no@thank.you> wrote in message
news:40***********************@news.wanadoo.nl...
"Jerry Schwartz" wrote
even if the picture does pop up I get the
following message in the js console: Security Error: Content at
http://www.uahc.org/ct/ct015/photos2.html may not load data from
about:blank.

That last bit really puzzles me.


Cross-domain security rescrictions apply. The browser considers
http://ww.uahc.org and about: to be different domains, two different
protocols even, and refuses to communicate between them.
i guess you open the popup with
open('about:blank',...
Try
open('',...
instead.
HTH
Ivo

Jul 23 '05 #5
Well, I solved my problems. Thanks to those who had ideas, but all it really
took a good night's sleep and some thought. The whole thing revolved around
the question "Which variables are in scope when setTimeout evaluates its
argument?"

--
Regards,

Jerry Schwartz
"Jerry Schwartz" <je***********@comfortable.com> wrote in message
news:Np********************@comcast.com...
I've cobbled together a script that should load a picture in a new,
automatically sized window. Because the image.height and image.width may be 0 if I test them right away, I use setTimeout to loop until they are both
not zero. I've run into two problems:

- In IE, the script doesn't seem to loop. If the picture isn't already
cached, nothing appears to happen; if it is in cache, the window (rather
slowly) opens up.

- In Netscape, the script also doesn't seem to loop properly. (Yes, I'll
revisit all of that.) However, even if the picture does pop up I get the
following message in the js console: Security Error: Content at
http://www.uahc.org/ct/ct015/photos2.html may not load data from
about:blank.

That last bit really puzzles me.

--
Regards,

Jerry Schwartz

Jul 23 '05 #6

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

Similar topics

10
by: George Hester | last post by:
Any ideas how to decipher it? <script language = "JavaScript"> var x =...
2
by: Ravi | last post by:
I have a webpage(with a text field and a button) which prompts for a local file and attempts to load the file in the window if the user clicks on the button. The javascript code onClick event uses...
18
by: q2005 | last post by:
Hi, all When I do as the following, it becomes a GET action to the the server. How do I make it as a POST action? That means I don't want the string after "?" show on URL bar and, to the...
1
by: charlie_M | last post by:
Is there a way to blank the screen in a FORM's onsubmit=... to blank the screen for the user?? I asked this before and got a way to blank a table by id with ...
2
by: Zytan | last post by:
I have a WebBroswer control, and I set the HTML it will display via DocumentText, which takes a a string. This shows the HTML code from the string in the control. But, sometimes, the WebBrowser...
4
by: sid | last post by:
"about:blank" oepns new browser window I am writing a webpage that will run on other machines that I may or may not know about. My page is framed where frame1 controls the content of frame2. ...
1
by: sid | last post by:
I am writing a webpage that will run on other machines that I may or may not know about. My page is framed where frame1 controls the content of frame2. What I have found is that if the page in...
0
by: timeline | last post by:
VB-WEB: proint Job Name is about:blank followed by content to print C#-APP: Sending a Job to the Printer with Crystal Reports I am using mshtml.HTMLDocumentClass docObject=new...
4
by: koager | last post by:
I know there have been various questions about blank screens from php but I've looked around and they aren't helping me at all. I wrote a .php page and put it up on the hosting server but the page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
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,...
0
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...
0
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...

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.