Hi,
I've read many questions about how to automatically open a new window
from a page using the JavaScript onLoad command.
Unfortunately, due to the web application framework being used
(WebLogic Portal 7), I can not use it as it is already being used and
is only called once by the browser(so I believe).
What I am essentially trying to do is open a "Please wait, this may
take some time" window while some sort data retrieval is done and then
close it when the method has returned and the rest of the page is ready
to be displayed.
I appreciate this is a JavaScript forum, but any solution would be
appreciated.
Many Thanks
Jadiyo 4 2872
jadiyo wrote: Hi,
I've read many questions about how to automatically open a new window from a page using the JavaScript onLoad command.
Unfortunately, due to the web application framework being used (WebLogic Portal 7), I can not use it as it is already being used and is only called once by the browser(so I believe).
What I am essentially trying to do is open a "Please wait, this may take some time" window while some sort data retrieval is done and then close it when the method has returned and the rest of the page is ready to be displayed.
I appreciate this is a JavaScript forum, but any solution would be appreciated.
Many Thanks
Jadiyo
There are two things you could do - You could change the function called
in your onLoad to call something else... and have its value contained
inyour new function... thus if onLoad="someRou tine();" then you could
create a new function called newFunction and have it call someRoutine()
and to perform your window.open... Then change onLoad to call newFunction.
Failing that... you could just put in a window.open call in a piece of
inline javascript... this would be called automatically when read (put
it at the end of your HTML, just inside the </BODY> tag to ensure its
run late...
Does that help you any?
(I gather you've already thought about the number of browsers out there
that would disable popups)
randelld
jadiyo wrote: Hi,
I've read many questions about how to automatically open a new window from a page using the JavaScript onLoad command.
Unfortunately, due to the web application framework being used (WebLogic Portal 7), I can not use it as it is already being used and is only called once by the browser(so I believe).
What I am essentially trying to do is open a "Please wait, this may take some time" window while some sort data retrieval is done and
then close it when the method has returned and the rest of the page is
ready to be displayed.
I appreciate this is a JavaScript forum, but any solution would be appreciated.
Many Thanks
Jadiyo
window.onload isn't a 'command', it's an object property, assigned like
any variable. It's called as window.onload() when the event for which
it is named - Load in this case - fires. The challenge is not to
overwrite any previously made assignments to it when adding new
listeners. DOM addEventListene r() was designed for this, encapsulating
the process so it can be done non-destructively. Unfortunately, *all*
listeners need to be registered this way for it to succeed. Here's a
way to assign a new onload handler without overwriting the old:
var oldhandler = window.onload;
window.onload = function()
{
if (oldhandler)
oldhandler();
newhandler();
}
hth
RobB wrote: jadiyo wrote:
Hi,
I've read many questions about how to automatically open a new window from a page using the JavaScript onLoad command.
Unfortunately , due to the web application framework being used (WebLogic Portal 7), I can not use it as it is already being used and is only called once by the browser(so I believe).
What I am essentially trying to do is open a "Please wait, this may take some time" window while some sort data retrieval is done and
then
close it when the method has returned and the rest of the page is
ready
to be displayed.
I appreciate this is a JavaScript forum, but any solution would be appreciated .
Many Thanks
Jadiyo
window.onload isn't a 'command', it's an object property, assigned like any variable. It's called as window.onload() when the event for which it is named - Load in this case - fires. The challenge is not to overwrite any previously made assignments to it when adding new listeners. DOM addEventListene r() was designed for this, encapsulating the process so it can be done non-destructively. Unfortunately, *all* listeners need to be registered this way for it to succeed. Here's a way to assign a new onload handler without overwriting the old:
var oldhandler = window.onload; window.onload = function() { if (oldhandler) oldhandler(); newhandler(); }
hth
I didn't make the OP but I do like the solution... its simple and
tidy... nice!
randelld
Thanks.
I used the simple inline javascript. I appreciate the popup issue, but
if I go down the route of writing a nice please wait page like BA and
Expedia, it could take some time to do in weblogic portal.
Jadiyo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nicola Pedrozzi |
last post by:
Here I really need a guru... ;^(
I found out today with a big disappointment that :
window.open("url", ...)
and also
navigate("url")
limit the max length of the url string to something like 2080
characters. That on Explorer only; Netscape and Mozilla work perfectly
|
by: alanstew |
last post by:
With the body tag calling out 'window onload', a function with a
'window.open' fails at the 'window.open' line. If I cut out the body
tag, the function executes as normal.
At first I thought it was the entire function failing, but I tested
with alerts and found that it was only the 'window.open' that fails to
execute.
The function is being called by a link, and I suspected some problem
with the body alink/vlink but after cutting that out...
|
by: David McCulloch |
last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it.
Why not?
(Don't ask why I simply did not open the window with the new size....my
original problem was how to open a new window with maximized dimensions!)
FYI, I uploaded the same code to:
http://tosasoft.com/test/open.htm
========================================
|
by: NeverLift |
last post by:
But, if it's not open, I don't want to open it . . . using
window.open will open it if it doesn't exist, even if the url in that
open is null (the window is then empty -- but it's open).
The situation is: A main window opens child windows one at a time as
the user requests, each with its own name. The user may click in any
child window or the main window to open a summary window, which has a
name all windows know. I want to get that...
|
by: Richard Bell |
last post by:
I'm a bit new to Javascript and am trying to do
oNewWin = window.open( ... );
then determine when the contents of oNewWin are completely loaded.
I've tried
oNewWin.attachEvent( "onload", myfunc);
| |
by: J Gao |
last post by:
Hi, experts,
On a button click, I need to save some data to the session object. Then open
a new window. The new window will use the session data saved in the first
window. I don't want use to click two buttons, one to save the session data
and the other one to trigger the java script to open the new window. Your
advice is highly appreciated.
Jie
|
by: Seth Grimes |
last post by:
Hello all,
I want to open a window when a user leaves my site. I set up a function
called by onUnload. To skip the window.open if the user hasn't left my
site, I set a variable in my links and test for it in the onUnload function.
If the variable is set, don't open the window. If it's not -- if the user
is leaving my site -- do open the window.
The problem is dealing with the browser Back, Forward, and Reload buttons.
I don't want...
|
by: Dave |
last post by:
For some reason, the below lines only work on select machines. All
machines are running IE6. IE SP's and OS's vary. When it doesn't
work, default.aspx (the page that this code is in) opens and closes.
That's all you see. TSReminder.aspx doesn't even open. I'm not sure
what's going on here.
Response.Write("<script...
|
by: Socrates |
last post by:
Hi - Have tried for half and hour to get this script to work:
I am trying to close the parent window while opening a centred new
child window
I would be grateful if someone could correct the script below which
does open a new window, but not in a centred position.
Here is the link to the url:
|
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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: 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...
| | |