473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Debugger Issue

RM
I have a page that a .NET control on it. On onLoad I call a JavaScript
function that makes calls to methods in this control to initialize it. This
works fine if I just open the URL in a browser. However, if I try to run
the project from within the debuggerI get a JavaScript error stating that
the object does not support this method. Since it works outside the
debugger I know that this may have something to do with the creation of the
control.

The code looks something like the following:

<%@ Page language="c#" Codebehind="Navigation.aspx.cs"
AutoEventWireup="false" Inherits="MedusaReport.Reports.Navigation" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Navigation</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="functions.js"/>
function InitializeNavControl()
{
navigatorControl.SetServer(UIControlParameters[0],
UIControlParameters[1], UIControlParameters[2]);
navigatorControl.SetConfigurationFile(UIControlPar ameters[3]);
navigatorControl.SetPostTarget(UIControlParameters[4]);
navigatorControl.attachEvent("OnReportRequest",han dleEvent);
}
</SCRIPT>
</HEAD>
<BODY MS_POSITIONING="GridLayout" onload="InitializeNavControl()">
<OBJECT id="navigatorControl" style="LEFT: 0px; TOP: 0px"
classid="aaWebClient.dll#WebClient.aaNavigatorCont rol"
VIEWASTEXT>
</OBJECT>
<form id="Form1" method="post" runat="server">
&nbsp;
</form>
</BODY>
</HTML>
Nov 18 '05 #1
2 1060
RM,
Maybe try registering the Jscript..
Look through:-
http://www.ondotnet.com/pub/a/dotnet...15/aspnet.html
Hope it helps
Patrick

"RM" wrote:
I have a page that a .NET control on it. On onLoad I call a JavaScript
function that makes calls to methods in this control to initialize it. This
works fine if I just open the URL in a browser. However, if I try to run
the project from within the debuggerI get a JavaScript error stating that
the object does not support this method. Since it works outside the
debugger I know that this may have something to do with the creation of the
control.

The code looks something like the following:

<%@ Page language="c#" Codebehind="Navigation.aspx.cs"
AutoEventWireup="false" Inherits="MedusaReport.Reports.Navigation" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Navigation</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript" SRC="functions.js"/>
function InitializeNavControl()
{
navigatorControl.SetServer(UIControlParameters[0],
UIControlParameters[1], UIControlParameters[2]);
navigatorControl.SetConfigurationFile(UIControlPar ameters[3]);
navigatorControl.SetPostTarget(UIControlParameters[4]);
navigatorControl.attachEvent("OnReportRequest",han dleEvent);
}
</SCRIPT>
</HEAD>
<BODY MS_POSITIONING="GridLayout" onload="InitializeNavControl()">
<OBJECT id="navigatorControl" style="LEFT: 0px; TOP: 0px"
classid="aaWebClient.dll#WebClient.aaNavigatorCont rol"
VIEWASTEXT>
</OBJECT>
<form id="Form1" method="post" runat="server">

</form>
</BODY>
</HTML>

Nov 18 '05 #2
onload is too early to call InitializeNavControl(). onload fires after the
page has been rendered, but before any objects are necessarily loaded (as
this is done by a seperate thread). after all the download of the control
may take minutes (or the user may abort the download). you need to wait for
the readyState to equal 4. javascript (unless fired by a control event)
should never access an object without first checking the readyState.

function InitializeNavControl()
{
// if not ready, try agin later

if (navigatorControl.readyState != 4)
{
window.setTimeout("InitializeNavControl()",10);
return;
}
navigatorControl.SetServer(UIControlParameters[0],UIControlParameters[1],
UIControlParameters[2]);
navigatorControl.SetConfigurationFile(UIControlPar ameters[3]);
navigatorControl.SetPostTarget(UIControlParameters[4]);
navigatorControl.attachEvent("OnReportRequest",han dleEvent);
}

"RM" <da***************@yahoo.com> wrote in message
news:O%****************@TK2MSFTNGP10.phx.gbl...
| I have a page that a .NET control on it. On onLoad I call a JavaScript
| function that makes calls to methods in this control to initialize it.
This
| works fine if I just open the URL in a browser. However, if I try to run
| the project from within the debuggerI get a JavaScript error stating that
| the object does not support this method. Since it works outside the
| debugger I know that this may have something to do with the creation of
the
| control.
|
| The code looks something like the following:
|
| <%@ Page language="c#" Codebehind="Navigation.aspx.cs"
| AutoEventWireup="false" Inherits="MedusaReport.Reports.Navigation" %>
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
| <HTML>
| <HEAD>
| <title>Navigation</title>
| <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
| <meta name="CODE_LANGUAGE" Content="C#">
| <meta name="vs_defaultClientScript" content="JavaScript">
| <meta name="vs_targetSchema"
| content="http://schemas.microsoft.com/intellisense/ie5">
| <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"
SRC="functions.js"/>
| function InitializeNavControl()
| {
| navigatorControl.SetServer(UIControlParameters[0],
| UIControlParameters[1], UIControlParameters[2]);
| navigatorControl.SetConfigurationFile(UIControlPar ameters[3]);
| navigatorControl.SetPostTarget(UIControlParameters[4]);
| navigatorControl.attachEvent("OnReportRequest",han dleEvent);
| }
| </SCRIPT>
| </HEAD>
| <BODY MS_POSITIONING="GridLayout" onload="InitializeNavControl()">
| <OBJECT id="navigatorControl" style="LEFT: 0px; TOP: 0px"
| classid="aaWebClient.dll#WebClient.aaNavigatorCont rol"
| VIEWASTEXT>
| </OBJECT>
| <form id="Form1" method="post" runat="server">
| &nbsp;
| </form>
| </BODY>
| </HTML>
|
|
Nov 18 '05 #3

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

Similar topics

6
by: jonathan | last post by:
everyone, I'd like to be able to debug php scripts on the command line, going through the browser. In other words, set up the debugger to listen and then type in a url and have the code stop...
4
by: Chuck Ritzke | last post by:
Hi, I've been using VS for a number of projects and the debugger has worked as advertised until now. I have a desktop solution with three projects, two of which are class modules. For some...
5
by: rawCoder | last post by:
On running a console app from Windows Server 2003 with Debugger.Break() makes an Abort Retry Ignore popup appear stating that a user defined breakpoint is reached. Works the same in both Release...
6
by: Ken Varn | last post by:
I am trying to remote debug a C# application but the debugger is reporting the following exception: An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module....
4
by: Girish | last post by:
Ok, starting from the basics. Reference types and value types are all objects underneath. So, a String is an object as well. Now, when when we are debugging and we examine the contents of a...
1
by: Manfred Braun | last post by:
Hi All, I am writing a tool, which should monitor some exe-processes, which are not very solid. Th main function is to re-start them, if they hung, but this is complicated. I can detect things...
5
by: Peter Oliphant | last post by:
Not a big deal, but it looks like the runtime debugger 'inspects' (e.g., Autos window) user-defined enum's as having <undefined value>, even though the execution seems to recognize their value just...
4
by: Ryan Gaudet | last post by:
Hi, I'm making some minor changes to a VB 6 app that I converted to VB .NET a couple of years ago and I'm running into an issue with a function that is seemingly returning a different result in...
18
by: R. Bernstein | last post by:
Okay, a bit of an exaggeration. Recently, I've been using Python more seriously, and in using the debugger I think one of the first things I noticed was that there is no "restart" ("R" in...
7
by: colin | last post by:
Hi, Ive written a 3dmodel editor, and it works fairly well it harldy uses any cpu exept when its loading a texture from bitmap in the debugger, at all other times it hardly uses any cpu but from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...

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.