Hallo,
I have some JS which creates a new 2-frame window.
The new window (via onLoad) backfills a variable
in the parent window so I'll know when it's safe
to load the target frame.
The problem is that no matter what kind of delay
I set (1 or more seconds), trying to update the
new frame always generates a 'newwin no properties'
type error.
If I introduce a single alert call for debugging,
the target frame update works fine; otherwise never.
This occurs with modern versions of both IE and
Mozilla. Here's the JS:
var loaded = null;
....
function checkload() {return loaded ? true : false;}
function update() {
if ( !newwin || newwin.closed ) {
newwin = window.open('/path/some.html', '','query' );
newwin.focus();
}
....
if ( checkload() ) {
//alert("loaded=" + loaded); // loads fine
clearTimeout(wi ndow.id);
} else {
window.id = setTimeout('che ckload()', 1000);
}
newwin.frames[1].location.href= '/path/cgi/some.cgi?qrystr ';
Any thoughts appreciated.
Rgds,
--
Charles DeRykus 4 1483 ce*@carios2.ca. boeing.com a écrit : Hallo,
I have some JS which creates a new 2-frame window. The new window (via onLoad) backfills a variable in the parent window so I'll know when it's safe to load the target frame.
The problem is that no matter what kind of delay I set (1 or more seconds), trying to update the new frame always generates a 'newwin no properties' type error.
If I introduce a single alert call for debugging, the target frame update works fine; otherwise never.
This occurs with modern versions of both IE and Mozilla. Here's the JS:
var loaded = null; ...
function checkload() {return loaded ? true : false;}
function update() { if ( !newwin || newwin.closed ) { newwin = window.open('/path/some.html', '','query' ); newwin.focus();
If the new window is closed or if its reference in memory is inexistent,
then you create it: then why would you need to focus it if it is going
to be created?
} ... if ( checkload() ) { //alert("loaded=" + loaded); // loads fine clearTimeout(wi ndow.id); } else { window.id = setTimeout('che ckload()', 1000);
How/what is the code suppose to do with id here? there is no id property
for window.
} newwin.frames[1].location.href= '/path/cgi/some.cgi?qrystr ';
Any thoughts appreciated.
Rgds,
Can you provide an url where this problem happens? An url for the
[path]/some.html and for its opener. As filed, it's very difficult to
guess what's needed ..
Gérard
--
remove blah to email me
Gérard Talbot wrote: ce*@carios2.ca. boeing.com a écrit : Hallo,
I have some JS which creates a new 2-frame window. The new window (via onLoad) backfills a variable in the parent window so I'll know when it's safe to load the target frame.
The problem is that no matter what kind of delay I set (1 or more seconds), trying to update the new frame always generates a 'newwin no properties' type error.
If I introduce a single alert call for debugging, the target frame update works fine; otherwise never.
This occurs with modern versions of both IE and Mozilla. Here's the JS:
var loaded = null; ...
function checkload() {return loaded ? true : false;}
function update() { if ( !newwin || newwin.closed ) { newwin = window.open('/path/some.html', '','query' ); newwin.focus(); If the new window is closed or if its reference in memory is inexistent, then you create it: then why would you need to focus it if it is going to be created?
Hm, the update will occur in that window so I wanted it to
be visible. As I recall, it remains submerged sometimes
without the focus call. } ... if ( checkload() ) { //alert("loaded=" + loaded); // loads fine clearTimeout(wi ndow.id); } else { window.id = setTimeout('che ckload()', 1000);
How/what is the code suppose to do with id here? there is no id property for window.
You're right -- I forgot that declaration. } ...
Fortunately, I made a change to setTimeout and everything is fine.
Here's the change:
window.id = setTimeout('upd ate()', 1000);
This works every time. I'm not sure why -- the scope makes more
sense to me as I think about what's happening though.
Thanks,
--
Charles DeRykus ce*@carios2.ca. boeing.com a écrit : Gérard Talbot wrote:
ce*@carios2.c a.boeing.com a écrit :
Hallo,
I have some JS which creates a new 2-frame window. The new window (via onLoad) backfills a variable in the parent window so I'll know when it's safe to load the target frame.
The problem is that no matter what kind of delay I set (1 or more seconds), trying to update the new frame always generates a 'newwin no properties' type error.
If I introduce a single alert call for debugging, the target frame update works fine; otherwise never.
This occurs with modern versions of both IE and Mozilla. Here's the JS:
var loaded = null; ...
function checkload() {return loaded ? true : false;}
function update() { if ( !newwin || newwin.closed ) { newwin = window.open('/path/some.html', '','query' ); newwin.focus();
If the new window is closed or if its reference in memory is inexistent, then you create it: then why would you need to focus it if it is going to be created?
Hm, the update will occur in that window so I wanted it to be visible. As I recall, it remains submerged sometimes without the focus call.
The window is to be created, not updated. A newly created window is not
"submerged" like you say. It "pops" up on top of all other windows.
Gérard
--
remove blah to email me
Gérard Talbot wrote: ce*@carios2.ca. boeing.com a écrit : Gérard Talbot wrote:
ce*@carios2.c a.boeing.com a écrit : ..... Hm, the update will occur in that window so I wanted it to be visible. As I recall, it remains submerged sometimes without the focus call.
The window is to be created, not updated. A newly created window is not "submerged" like you say. It "pops" up on top of all other windows.
True, perhaps, something else occurred to cause the newly
created window to lose focus. At any rate, the focus of
the newly created window wasn't the real issue and the problem
has dissolved with the change to SetTimeout.
--
Charles DeRykus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: VK |
last post by:
Hi!
What I'm missing in following code? Cannot get the values of
radiobuttons. Starting only one class (GetVariant), it works. When I put
two classes together, it doesn't.
Regards, VK
from Tkinter import *
class GetVariant:
def __init__(self):
self.root = Tk()
|
by: randau |
last post by:
Linking to a Targeted Browser Window
I'd like to open reference links to other web sites in a
separate browser window from the browser window hosting my
own web site pages. The Link Target reserve word "_blank"
opens a blank new browser window for every link, which can
sometimes result in a lot of open browser windows.
Is there no way...
|
by: Jim Cobban |
last post by:
I have a set of web pages that are organized in pairs. One of each pair
contains a graphic and the other is an extended description of the graphic.
I am trying to set it up that selecting a single hyperlink causes the
correct pair of web pages to be loaded into two windows. My current
approach is to specify an onload action in the <BODY> tag...
|
by: FP |
last post by:
I'm displaying a list of messages.
Each message can be checkmarked as done or not done.
When a user clicks on the checkmark I want the following to happen;
- checkbox status is toggled between checked & unchecked
- database record is updated
- HTML page is NOT reloaded
Can I do the following in javascript?
- have clicking the checkbox run...
|
by: redpayne |
last post by:
Ok-I am doing homework out of a book and the instructions are to display an interface with 5 option buttons in a frame. When clicked, each button changes the background color of the frame. It proceeds to tell me to construct CheckboxGroup, use FlowLayaout and add the Checkboxes to the frame along with ItemListener.
It says...
| |
by: fishwick |
last post by:
I haven't really done any css in quite a while, and am banging my head
against the wall trying get the rudimentary layout together of a church
website home page to display correctly - I don't want to continue work
until I understand what I'm doing wrong.
http://www.christchurchinfo.net
The site displays nicely in Firefox/Mozilla and...
|
by: netling |
last post by:
Ok, Here is my situation... we have a 64 page pdf that we have broken up into separate pages. We are needing a frame set to have a "Previous Page and Next Page" navigation at the bottom of the window. I am wanting to capture the URL in the top frame where the PDFs are displayed and update the URL of the URL/pdf to be +1 or -1. Example of top frame...
|
by: Daniel Gee |
last post by:
I'm trying to learn WxPython with the tutorial:
http://wiki.wxpython.org/Getting_Started
But I can't seem to get the example for events to work. I pasted the
code they had directly into an interpreter and it got a dialog to
appear and the program was able to close itself, but my own copy won't
work. As far as I can see, it isn't at all...
|
by: matheussousuke |
last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails.
The goal is: Make it send the email with the URL http://mghospedagem.com/images/controlpanel.jpg
instead of
http://mghospedagem.comhttp://mghospedagem.com/images/controlpanel.jpg
As u see, there's the...
|
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...
|
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. ...
| |
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...
|
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...
|
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...
|
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...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |