I have a situation where a bit of script needs to pop up another
window, and then call a script in that new window. My conundrum is
that the script should not be called until the new window has rendered
completely. What's the best way for the new window to tell its opener
that it is fully rendered? The thought that occurs to me is having a
script at the bottom of the new window that calls a script in the
openening window that then calls the "real" script in the new window.
The obvious solution (having the new window just call the script
itself) isn't feasible because the opener has the information that the
new window's script needs. Is there a better way to do this? I
apologize if I've explained my situation poorly.
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome. 3 1368
It doesn't truly matter where the script goes. If you want to be sure it
doesn't run until the window has fully loaded its code, put your script at
the end
- Wm
--
William Morris
Semster, Seamlyne reProductions
Visit our website, http://www.seamlyne.com, for the most comfortable
historically inspired clothing you can buy!
"Christophe r Benson-Manica" <at***@nospam.c yberspace.org> wrote in message
news:c5******** **@chessie.cirr .com... I have a situation where a bit of script needs to pop up another window, and then call a script in that new window. My conundrum is that the script should not be called until the new window has rendered completely. What's the best way for the new window to tell its opener that it is fully rendered? The thought that occurs to me is having a script at the bottom of the new window that calls a script in the openening window that then calls the "real" script in the new window. The obvious solution (having the new window just call the script itself) isn't feasible because the opener has the information that the new window's script needs. Is there a better way to do this? I apologize if I've explained my situation poorly.
-- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Christopher Benson-Manica wrote: I have a situation where a bit of script needs to pop up another window, and then call a script in that new window. My conundrum is that the script should not be called until the new window has rendered completely. What's the best way for the new window to tell its opener that it is fully rendered? The thought that occurs to me is having a script at the bottom of the new window that calls a script in the openening window that then calls the "real" script in the new window. The obvious solution (having the new window just call the script itself) isn't feasible because the opener has the information that the new window's script needs. Is there a better way to do this? I apologize if I've explained my situation poorly.
page1 opens page2
page1 wants to call a function in page2
page1 needs to know when page2 gets loaded.
page1:
window.open('pa ge2.html')
page2:
function iAmLoaded(){
window.opener.f unctionNameInPa ge1YouWantToRun ();
}
window.onload = iAmLoaded;
--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
In the new window that opens:
<script>
window.onload = function () {
var neededInfo = window.opener.g etInfoForNewWin dow();
// Use info gotten from parent window here.
}
</script>
Or let the parent window know when the new window is ready:
<script>
window.onload = function () {
window.opener.n ewWindowIsOpen( );
}
</script>
Or you could actually check the status of the new window from the
parent window, but this is going to be more browser specific.
-Nate
Christopher Benson-Manica <at***@nospam.c yberspace.org> wrote in message news:<c5******* ***@chessie.cir r.com>... I have a situation where a bit of script needs to pop up another window, and then call a script in that new window. My conundrum is that the script should not be called until the new window has rendered completely. What's the best way for the new window to tell its opener that it is fully rendered? The thought that occurs to me is having a script at the bottom of the new window that calls a script in the openening window that then calls the "real" script in the new window. The obvious solution (having the new window just call the script itself) isn't feasible because the opener has the information that the new window's script needs. Is there a better way to do this? I apologize if I've explained my situation poorly. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TL |
last post by:
Please help. I need to get this problem resolved ...
When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS'
CMD window popped up and stayed there until CGI timeout. The funny
thing was that it did run the Unix script and turned out the right
result. Just the CMD window ... I had to kill the window by clicking
on 'x'. After that it displayed CGI timeout error. What was going
on?
Thanks,
|
by: Kai Grossjohann |
last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window.
That's fine, I don't need to do anything about it.
But Ctrl-N in IE appears to clone the current window. Is there a way
to intercept the key so that I can do stuff on the server side to make
the new window behave correctly?
(We have a JSP-based webapp which stores state in the session. Now if
two windows access (and modify!) the same session, then madness will
result....
|
by: sonic |
last post by:
Hi,
I have some code attached to window.onload event and if there is a
missing flash file on the page for example, the browser (MSIE in my
case) displays "1 item(s) remaining" message, and since the page is not
finished loading, the onload event never fires.
Is there a way to make the browser treat missing links as broken, and
still fire window.onload ? or any other method to ensure that event
fires every time when html rendering is...
|
by: jessbody |
last post by:
The following javascript code (used as a bookmarklet) is supposed to
pop a window containig a "textarea".
javascript:(
function()
{
var nd =
window.open('','','directories=yes,left=0,width=600,height=300').document;
|
by: John Friedland |
last post by:
My problem: I need to call (from C code) an arbitrary C library
function, but I don't know until runtime what the function name is,
how many parameters are required, and what the parameters are. I can
use dlopen/whatever to convert the function name into a pointer to
that function, but actually calling it, with the right number of
parameters, isn't easy.
As far as I can see, there are only two solutions:
1) This one is portable. If...
| |
by: grayaii |
last post by:
Hi,
I have a simple form that handles all its paint functionality like so:
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.Opaque, true);
And the entry point to this program is like so:
static void Main()
{
|
by: Bob Jones |
last post by:
Here is my situation:
I have an aspx file stored in a resource file. All of the C# code is
written inline via <script runat="server"tags. Let's call this page
B. I also have page A that contains some javascript code that calls
window.open. I pass the resource url of page B to Page A's window.open
call. Page B is then loaded and executed but none of the server-side
code is rendered. If I view the source of the page, the code (and page...
|
by: kkganakga |
last post by:
Hi,
I used a short code to pop up a thumbnail in a new window for a gallery view. The problem is I would like to disable the right click function on the popped up / new window. How can I do this?
This is the code i used to pop up the window:
<a href="#"><img src="sml/17.jpg" alt="Garden!" style=""...
|
by: Tweety |
last post by:
Hello,
I need to display the current Web Browser's Width on my web page. I
Tried Screen.width, but it is for the width of the Windows. I tried
Window.width, but it doesn't work.
What i want to do is, if the user resize the Web Browser's Window,
upon refresh, the webpage will show the width size of the web browser
windows. this will help me in working on Floating Menu on my web page.
thanks.
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |