473,657 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAP call in Netscape

Hi all -

I have a .NET web service running on a remote machine, and I have
Netscape Navigator 7.0 accessing it through javascript on the client
side through SOAP javascript coding. Everything works ok when I run
it, meaning the function gets successfully called and everything is
fine. I have a window.setInter val on my client side javascript, and it
calls the web service function every x milliseconds. However, as soon
as I try to close the window, it crashes the entire Netscape program.
Can anyone help me?

thanks.

Jul 23 '05 #1
13 1549


M B HONG 20 wrote:

I have a window.setInter val on my client side javascript, and it
calls the web service function every x milliseconds. However, as soon
as I try to close the window, it crashes the entire Netscape program.


Can you store the result of window.setInter val e.g.
var intervalId = window.setInter val(...)
and try to call clearInterval e.g.
<input type="button" value="close"
onclick="window .clearInterval( intervalId);
window.close(); ">
before the window is closed? That way it is at least possible to tell
whether a pending timer is causing the crash.

And of course your original attempts to call the web service that you
posted earlier were all synchronous calls which block the browser so you
should change that to do asynchronous calls, that might improve things.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Martin - Thanks again for your reply.

Since my application is very time sensitive, I'm afraid that I must
stick with a synchronous approach. I implemented the
window.clearInt erval for the timer, and it works. However, is this the
only way to get around this crash? Because if someone clicks on the
"close" button i have created it wont crash, but if he decides to just
close it with Alt + F4 or clicking on the "x", it will crash the entire
Netscape process. I've read around and come to the conclusion that
Netscape does not have an OnClose event or something similar in its
API. any ideas? thanks.

Charles.

Jul 23 '05 #3


M B HONG 20 wrote:

I implemented the
window.clearInt erval for the timer, and it works. However, is this the
only way to get around this crash? Because if someone clicks on the
"close" button i have created it wont crash, but if he decides to just
close it with Alt + F4 or clicking on the "x", it will crash the entire
Netscape process.


Try whether
window.onunload = function (evt) {
clearInterval(i ntervalId);
};
works and avoids the crash.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
Martin -

window.onunload = function () only appears to work when the window is
reloaded/refreshed. Nothing fired when I tried to close it manually.

Jul 23 '05 #5


M B HONG 20 wrote:

window.onunload = function () only appears to work when the window is
reloaded/refreshed. Nothing fired when I tried to close it manually.


It should fire when a window is closed as the document in the window is
unloaded first.

Do you still crash when

window.onunload = function (evt) {
clearInterval(i ntervalId);
}

is present?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #6
Martin -

Actually sorry, let me clarify what my application is doing first. The
reason why I must use web services is because on the server,
information is dynamically changing. What I am doing is checking to
see if the window needs to refresh. For some reason, when i call
clearInterval on the onunload event, the page does not refresh. For
testing, I put a simple alert on the onunload event like this:

function Close()
{
alert("close");
window.clearInt erval(intervalI d);
}

window.onunload = Close();

When i click something on the form, I guess Netscape automatically
unloads/loads the page, and the alerts come up. However, when I
manually close the window, nothing happens. But you are right, if I
have just the clearInterval on the onunload event, Netscape does not
crash. But, my application no longer works. Any advice for my
particular problem? Again, your help is greatly appreciated.

Charles.

Jul 23 '05 #7
VK
> window.onunload = Close();

Try instead:

window.onbefore unload = myFunction;

(note that there are not parenthesis after the function name in this
case)

Jul 23 '05 #8


M B HONG 20 wrote:

For
testing, I put a simple alert on the onunload event like this:

function Close()
{
alert("close");
window.clearInt erval(intervalI d);
}

window.onunload = Close();
It would need to be
window.onunload = Close;
to make any sense as you need to assign a function itself to the
window.onunload property and not call the function.
As for the alert it is known that alert/prompt/confirm dialogs in
onunload are swallowed if the window is closed so it does not help to
tell you whether onunload is called when the window is closed.

But you are right, if I
have just the clearInterval on the onunload event, Netscape does not
crash. But, my application no longer works.


What exactly does no longer work? Do you get any script error in the
JavaScript console?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #9


Martin Honnen wrote:

But you are right, if I
have just the clearInterval on the onunload event, Netscape does not
crash. But, my application no longer works.


Does it no longer work because you are trying to refresh the page but it
does not?
If I understand your current framwork correctly then you are calling the
web service to see whether to refresh the page, right?
Then it could help to try the following e.g.
var intervalId;

window.onunload = function (evt) {
if (intervalId) {
clearInterval(i ntervalId);
}
};

function callWebService () {
// do web service call here then depending on the result do
if (serviceReturns Refresh) {
clearInterval(i ntervalId);
window.onunload = null;
window.location .reload();
}
}

intervalId = setInterval('ca llWebService(); ', 5000);

That way the onunload clearing the interval timer will prevent the crash
when the window is closed but is deactivated before your code reloads
the page.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #10

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

Similar topics

0
4203
by: bigbinc | last post by:
I have setup a soap machine on linux and similar configuration works properly. on a windows mahcine, I get these erros on the addressbook, samples, any ideas. I am pretty sure my classpaths are setup correctly. using jboss-tomcat engine. This looks like text formatting issues.
2
9554
by: mkosca01 | last post by:
Hello, I have recently downloaded and installed the Soap Toolkit 3.0 from microsoft. I have successfully created the example web service DocSample1 and am able to run this from the command line using the following .vbs file. Option Explicit Dim soapClient3
0
4665
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by another web service that validates a security token in the header. I have pasted my current SOAP message that my code sends as captured from a trace function that I added. Below that is a sample SOAP message that the developer of the web...
31
2827
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our perspective, should be as simple as defining an object and viewing a parameter on that object. My boss has worked with it and I'm still tryin'... TIA! -- TFWBWY...A
1
5980
by: libsfan01 | last post by:
Hi all Can anyone explain the relationship between SOAP and XMLHttpRequest in Javascript? What actually is SOAP? and how does it relate to the process of transferring data client-side through the aforementioned method?
0
1708
by: santycalde | last post by:
Hi!! I am executing a call to a webservice with SOAP and the following mistake takes place: The XML of the wsdl is: <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions targetNamespace ="http://PkgFechaSistemaSync" xmlns:tns ="http://PkgFechaSistemaSync" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/ " xmlns:soap12=" http://www.w3.org/2003/05/soap-envelope" xmlns:xsd ="http://www.w3.org/2001/XMLSchema "...
0
2242
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data. The problem I have is the first record gets processed fine where as the second record always; reason being the EAI expects it to be a seperate call Though I am creating/reseting a new service everytime within the foreach loop the data seems to be...
0
8427
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, 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...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8523
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,...
0
8626
tracyyun
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...
0
7355
agi2029
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...
1
6178
isladogs
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...
0
5649
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();...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.