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 5 7173
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.javas cript FAQ - http://jibbering.com/faq/
"Jerry Schwartz" <je***********@ comfortable.com > wrote in message
news:Np******** ************@co mcast.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 :bla nk',...
Try
open('',...
instead.
HTH
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 :bla nk',...
Try
open('',...
instead.
HTH
Ivo
I really shouldn't post when I'm tired... I'm not, myself, referenced
"about :blan k" 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.n l... "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:bla nk',... Try open('',... instead. HTH Ivo
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******** ************@co mcast.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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: George Hester |
last post by:
Any ideas how to decipher it?
<script language = "JavaScript">
var x =...
|
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 the
location.href property to achieve the desired result. (This loaded
page has some additional functionality which lets them upload the
contents to the server.)
This approach only seem to work for some computers and on others it is
loading a...
|
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 server, it can follow POST function to get the
data passed in. Thank you very much!
window.open("../../Server.php?"+xsValue, "", zNONHTML_STYLE);
|
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
"document.getElementById('tabid').style.display='none';" in the onclick
event and setting the encapsulating table's ID to 'tabid'.
I was wondering if this or some other similar approach that could
possibly be planted globally in my pages in the onsubmit validation
|
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 shows
nothing. Clicking 'view source' shows: "<HTML></HTML>", and the
filename is called "about_blank.txt", which is the about:blank URL.
I am aware that when you set this property, the WebBrowser control
automatically navigates to the...
| |
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.
What I have found is that if the page in Frame2 fails to load and I
get an error page. when I detect an error page I want to set
frame2.location.href = "about:blank" and then write a temp error page
until the server becomes available again. The...
|
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 Frame2 fails to load and I
get an error page. when I detect an error page I want to set
frame2.location.href = "about:blank" and then write a temp error page
until the server becomes available again. The problem is that the
security on some...
|
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 mshtml.HTMLDocumentClass();
mshtml.IHTMLDocument2 doc2 =docObject;
mshtml.IHTMLDocument4 doc4=docObject;
doc2..writeln("<html></html>");
doc2.close();
|
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 keeps on returning blank. I've checked that I have all my brackets and semicolons placed correctly.
I've added
<?php
//turn on error reporting
ini_set('display_errors',1);
ERROR_REPORTING(E_ALL);
?>
|
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: 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,...
|
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: 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...
|
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: 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
| |