473,516 Members | 3,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ClientSide Error Handling...

Hi everyone,

(Using javascript)
Here is my dillemma. I have an Active X control on the
page. And in the Page load I access 2 of its properties.
The issue is if the user has the option to turn off the
downloading of signed Active X controls. If this happens
the page throws a Runtime Error which states somthing to
the effect: Object does not have this property or method.

I have tried Using this to fail gracefully:

function handleError()
{
return true;
}

window.onerror = handleError;

But this does not catch this error. If anyone could please
shed some light on this issue. I just would like the page
to either fail silently or be able to write a custom
message. Thanks in advance!

Jorell
Nov 18 '05 #1
2 1338
Hmmm, interesting.. well, all that I have been able to find so far is to do
a try/catch block, or try to load an ActiveX control using the new
ActiveXControl() method and see if it errors out.

HTH,
Bill P.

"Jorell" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
Hi everyone,

(Using javascript)
Here is my dillemma. I have an Active X control on the
page. And in the Page load I access 2 of its properties.
The issue is if the user has the option to turn off the
downloading of signed Active X controls. If this happens
the page throws a Runtime Error which states somthing to
the effect: Object does not have this property or method.

I have tried Using this to fail gracefully:

function handleError()
{
return true;
}

window.onerror = handleError;

But this does not catch this error. If anyone could please
shed some light on this issue. I just would like the page
to either fail silently or be able to write a custom
message. Thanks in advance!

Jorell

Nov 18 '05 #2
you just check if the control is loaded and ready before trying to access
it.

myCtl = document.getElementById('myCtl');
if (myCtl && myCtl.readyState == 4)
{
// its safe to access control
}
-- bruce (sqlwork.com)

"Jorell" <an*******@discussions.microsoft.com> wrote in message
news:0a****************************@phx.gbl...
Hi everyone,

(Using javascript)
Here is my dillemma. I have an Active X control on the
page. And in the Page load I access 2 of its properties.
The issue is if the user has the option to turn off the
downloading of signed Active X controls. If this happens
the page throws a Runtime Error which states somthing to
the effect: Object does not have this property or method.

I have tried Using this to fail gracefully:

function handleError()
{
return true;
}

window.onerror = handleError;

But this does not catch this error. If anyone could please
shed some light on this issue. I just would like the page
to either fail silently or be able to write a custom
message. Thanks in advance!

Jorell

Nov 18 '05 #3

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

Similar topics

13
4436
by: Thelma Lubkin | last post by:
I use code extensively; I probably overuse it. But I've been using error trapping very sparingly, and now I've been trapped by that. A form that works for me on the system I'm using, apparently runs into problems on the system where it will actually be used, and since I used so little error-trapping it dies very ungracefully. I will of...
4
4072
by: Zeebra3 | last post by:
Here goes: I have a web form with several asp:dropdownlists, with which, when selection is changed I want to fire an event defined in some clientside js. The content of the clientside code is dependant on data collected in the code behind on the server. I have set AutoPostback to false for the controls and added lines such as...
0
1177
by: anonymous | last post by:
Thanks Michelle, How could I achieve the second one.I do not like Flashing windows in response to selection of an item. I agree the data transfer is very little but the same data transferred for more than once takes multiple of the initial load time. I used to use <%....%> in asp to achieve the forbidden method( :) just kidding) of client...
4
2533
by: TJS | last post by:
how do I get "onSubmit" to work in .net ? <Form id="Form1" name="Form1" method="post" onSubmit="return validateStandard(this, 'error');" runat="server">
3
2620
by: RFS666 | last post by:
Hello together, I tried to find out about populating an asp.net server control (a dropdownlist) from the clientside jscript, but I didn't find a solution up to now. I cannot use a html dropdownlist, because a database query in codebehind has to be done, when a new listItem is selected. So, I need to use a servercontrol dropdownlist. ...
0
11555
by: Lysander | last post by:
Thought I would give something back with a few articles. This article is a bit of code to add error handling. When I have time, I want to write articles on multilingual databases, and Access Security, but I'll start with something short and simple This code was written in Access 2003 but should be valid in Access 2000 By default, when you...
2
10710
by: John Kotuby | last post by:
Hi all, In ASP.NET 2.0 and VB.NET, I am trying to get the OnSelectedIndexChanged event to fire a Javascript function. There is no OnClientClick event for that control. When I try something like: OnSelectedIndexChanged="javascript:SetOwner('<%= lstOwner.ClientID %>');" I get an error.
7
2435
by: mc | last post by:
I've not been able to get a Check box to client side validated on postback. with my changes I can get it to work on the serverside ok but not on the client. I have created a new control as below:- public class ValidifiableCheckBox: CheckBox { public string ValidationValue{ get { return (this.checked ? bool.TrueString : string.Empty); }
9
3281
by: MrDeej | last post by:
Hello guys! We have an SQL server which sometimes makes timeouts and connection errors. And we have an function witch writes and updates data in 2 tables on this server. When the SQL server error appears it, in 99%, of the cases, works if we just press the play button in VBA debug. Therefor we have maked an error handling which just tryes...
0
7182
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...
0
7405
Oralloy
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. ...
1
7136
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...
0
5712
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...
1
5106
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...
0
4769
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...
0
3265
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...
0
1620
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
0
487
bsmnconsultancy
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...

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.