Visual Basic .NET » Web Forms
IE msxml3.dll Unspecified Error -- bubberz --


Now, I'm getting "msxml3.dll: Unspecified Error" for the line:
if (xmlHttp.readyState == 4 || xmlHttp.status == 200)
..via my Script Debugger.

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="AjaxTesting.WebForm1"%>



WebForm1



content="
http://schemas.microsoft.com/intellisense/ie5 
">






runat="server" onblur='process()'>





**********
**********

The code behind for the text.aspx page is very simple for now, and is:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Server.HtmlEncode(Request.QueryString("WBS")).ToString =
"1.2.8.5.001" Then
Response.Write("Please enter another WBS!")
Else
Response.Write("You can use this one!")
End If
End Sub

********************************************
*******************************************

bubberz wrote:
Hello! I'm a newbie to AJAX, and would really like to start using it
with my web application.

With the code below, what I'm trying to do is query the db and see if a
number already exists once the user types the value into the textbox,
then tabs out. I'd rather do this, than cause a post back and then
handle the number check that way.

With another attempt at my first real AJAX app, here's the initial
ASP.NET v1.1 page with the AJAX script in the Head tag, and I get the
"Unknown error" in the handleServerResponse() when it's assigning
"show" it's innnerHTML value:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="AjaxTesting.WebForm1"%>



WebForm1



content="
http://schemas.microsoft.com/intellisense/ie5 
">






cellPadding="1" width="75%" border="1">










onblur='process()'>


Text="Button">





**************
**************
The text.aspx page is simply this for the code behind:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Server.HtmlEncode(Request.QueryString("WBS")).ToString =
"1.2.8.5.001" Then
Response.Write("Please enter another WBS!")
Else
Response.Write("You can use this one!")
End If
End Sub

 

-- Michael Schwarz --


Hm, this is not a real Ajax.NET question. What is if you use the JavaScript code I use in my library? And, which browser and operating system are you using?

Regards,
Michael
On 7/7/06, bubberz wrote:

Now, I'm getting "msxml3.dll: Unspecified Error" for the line:
if (xmlHttp.readyState == 4 || xmlHttp.status == 200)
..via my Script Debugger.

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="AjaxTesting.WebForm1"%>



WebForm1



content="
http://schemas.microsoft.com/intellisense/ie5 
">






runat="server" onblur='process()'>





**********
**********

The code behind for the text.aspx page is very simple for now, and is:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Server.HtmlEncode(Request.QueryString("WBS")).ToString =
"1.2.8.5.001" Then
Response.Write("Please enter another WBS!")
Else
Response.Write("You can use this one!")
End If
End Sub

********************************************
*******************************************

bubberz wrote:
> Hello! I'm a newbie to AJAX, and would really like to start using it
> with my web application.
>
> With the code below, what I'm trying to do is query the db and see if a
> number already exists once the user types the value into the textbox,
> then tabs out. I'd rather do this, than cause a post back and then
> handle the number check that way.
>
> With another attempt at my first real AJAX app, here's the initial
> ASP.NET v1.1 page with the AJAX script in the Head tag, and I get the
> "Unknown error" in the handleServerResponse() when it's assigning
> "show" it's innnerHTML value:
>
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="WebForm1.aspx.vb" Inherits="AjaxTesting.WebForm1"%>
>
>
>
> WebForm1
>
>
>
> > content="
http://schemas.microsoft.com/intellisense/ie5 
">
>
>
>
>
>
>

> > cellPadding="1" width="75%" border="1">
>
>
>
>
>
>
>
>
>
>

> > onblur='process()'>

>

> > Text="Button">

>

>

>
>
>
>
> **************
> **************
> The text.aspx page is simply this for the code behind:
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> If Server.HtmlEncode(Request.QueryString("WBS")).ToString =
> "1.2.8.5.001" Then
> Response.Write("Please enter another WBS!")
> Else
> Response.Write("You can use this one!")
> End If
> End Sub
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info
-- bubberz --


Hello!

Sorry...I can delete this post from here.

I just added the reference of AjaxPro, and get the same error. But,
I'm not too sure where else I would need to change the code.

I'm using IE 6, sp2 on XP Pro.

-- Michael Schwarz --


Do you have ActiveX (marked as safe) enabled?

Regards,
Michael
On 7/7/06, bubberz wrote:

Hello!

Sorry...I can delete this post from here.

I just added the reference of AjaxPro, and get the same error. But,
I'm not too sure where else I would need to change the code.

I'm using IE 6, sp2 on XP Pro.
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info
-- bubberz --


Yes, just checked that.

Thanks!

-- Michael Schwarz --


And do you get the same error when visiting
http://www.ajaxpro.info 
/
or
http://munich.schwarz-interactive.de 
/?

Regards,
Michael
On 7/7/06, bubberz wrote:

Yes, just checked that.

Thanks!
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info
-- bubberz --


No, your two links show just fine w/o any errors.

Should I use a hidden frame instead of the XMLHTTPResponse object?

Seems like I shouldn't have to go this route, but it's getting a bit trivial....can't give up though.

Thanks for the help!

-- Michael Schwarz --


Can you look if your request is running the IFrame version? Simple open Fiddler and copy&paste the request body here...

Regards,
Michael
On 7/7/06, bubberz wrote:

No, your two links show just fine w/o any errors.

Should I use a hidden frame instead of the XMLHTTPResponse object?

Seems like I shouldn't have to go this route, but it's getting a bit
trivial....can't give up though.

Thanks for the help!
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info
-- bubberz --


Well, I did finally get this to work via the KYNOU.com web site and trying the tutorial:
http://www.kynou.com/GetTutorial.aspx?TutorialID=51 


This is a little bit different from what I was doing, but the concept is the same.

I didn't use a separate class file, but put the Ajax Method in the code behind. The app name is CSS:

--Start code behind Public Class WebForm1 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
AjaxPro.Utility.RegisterTypeForAjax(GetType(WebForm1))
End Sub
<AjaxPro.AjaxMethod()> Public Function GetStateName(ByVal stateInitial As String) As String
Select Case stateInitial.ToUpper()
Case "CA"
Return "California"
Case "NY"
Return "New York"
Case "IL"
Return "Illinois"
Case Else
Return "What tha'!"
End Select
End Function End Class
--End code behind

--Start HTML for WebForm1
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="
http://schemas.microsoft.com/intellisense/ie5 
">
<script language="javascript">
function getStateName(obj)
{
CSS.WebForm1.GetStateName(obj.value,CallbackFunc);
}
function CallbackFunc(res)
{
document.getElementById('txtStateName').value = res.value;
}

</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<div>State Initial:</div>
<asp:TextBox id="txtStateInitial" style="Z-INDEX:" runat="server"
onblur="getStateName(this);"></asp:TextBox>
<div>State Name:</div>
<input type="text" id="txtStateName">
</form>
</body>
</HTML>
--End HTML for WebForm1

******************

bubberz wrote:
Now, I'm getting "msxml3.dll: Unspecified Error" for the line:
if (xmlHttp.readyState == 4 || xmlHttp.status == 200)
..via my Script Debugger.

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="AjaxTesting.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET
7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="
http://schemas.microsoft.com/intellisense/ie5 
">
<!-- Start script -->
<script language="javascript">
var xmlHttp = createXmlHttpRequestObject();
function createXmlHttpRequestObject()
{
var xmlHttp;
if(window.ActiveXObject)
{
try
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
xmlHttp = false;
}
}
else
{
try
{
xmlHttp = new XMLHttpRequest();
}
catch (e)
{
xmlHttp = false;
}
}
if (!xmlHttp)
alert("Error creating the XMLHttpRequest object.");
else
return xmlHttp;
}
function process()
{
varWBS =
encodeURIComponent(document.getElementById("TextBox1").value);
xmlHttp.open("GET", "test.aspx?WBS=" + varWBS);
xmlHttp.onreadystatechange = handleServerResponse;
xmlHttp.send(null);
}
function handleServerResponse()
{
if (xmlHttp.readyState == 4 || xmlHttp.status == 200)
{
document.getElementById("show").innerHTML = xmlHttp.responseText;
}
}
</script>
<!-- End script -->
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 24px;
POSITION: absolute; TOP: 24px"
runat="server" onblur='process()'></asp:TextBox>
<div id="show" />
</form>
</body>
</HTML>

**********
**********

The code behind for the text.aspx page is very simple for now, and is:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Server.HtmlEncode(Request.QueryString("WBS")).ToString =
"1.2.8.5.001" Then
Response.Write("Please enter another WBS!")
Else
Response.Write("You can use this one!")
End If
End Sub

********************************************
*******************************************

bubberz wrote:
> Hello! I'm a newbie to AJAX, and would really like to start using it
> with my web application.
>
> With the code below, what I'm trying to do is query the db and see if a
> number already exists once the user types the value into the textbox,
> then tabs out. I'd rather do this, than cause a post back and then
> handle the number check that way.
>
> With another attempt at my first real AJAX app, here's the initial
> ASP.NET v1.1 page with the AJAX script in the Head tag, and I get the
> "Unknown error" in the handleServerResponse() when it's assigning
> "show" it's innnerHTML value:
>
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="WebForm1.aspx.vb" Inherits="AjaxTesting.WebForm1"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML>
> <HEAD>
> <title>WebForm1</title>
> <meta name="GENERATOR" content="Microsoft Visual Studio .NET
> 7.1">
> <meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
> <meta name="vs_defaultClientScript" content="JavaScript">
> <meta name="vs_targetSchema"
> content="
http://schemas.microsoft.com/intellisense/ie5 
">
> <!-- Start script -->
> <script>
> var xmlHttp = createXmlHttpRequestObject();
> function createXmlHttpRequestObject()
> {
> var xmlHttp;
> if(window.ActiveXObject)
> {
> try
> {
> xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
> }
> catch (e)
> {
> xmlHttp = false;
> }
> }
> else
> {
> try
> {
> xmlHttp = new XMLHttpRequest();
> }
> catch (e)
> {
> xmlHttp = false;
> }
> }
> if (!xmlHttp)
> alert("Error creating the XMLHttpRequest object.");
> else
> return xmlHttp;
> }
> function process()
> {
> varWBS =
> encodeURIComponent(document.getElementById("TextBox1").value);
> xmlHttp.open("GET", "test.aspx?WBS=" + varWBS);
> xmlHttp.onreadystatechange = handleServerResponse;
> xmlHttp.send(null);
> }
> function handleServerResponse()
> {
> if (xmlHttp.readyState==4 || xmlHttp.readyState==200)
> {
> document.getElementById("show").innerHTML = xmlHttp.responseText;
> }
> }
> </script>
> <!-- End script -->
> </HEAD>
> <body MS_POSITIONING="GridLayout">
> <form id="Form1" method="get" runat="server">
> <TABLE id="Table1" cellSpacing="1"
> cellPadding="1" width="75%" border="1">
> <TR>
> <TD>
> <asp:TextBox id="TextBox1" runat="server"
> onblur='process()'></asp:TextBox></TD>
> </TR>
> <TR>
> <TD>
> </TD>
> </TR>
> <TR>
> <TD>
> <asp:Button id="Button1" runat="server"
> Text="Button"></asp:Button></TD>
> </TR>
> </TABLE>
> <div id="show"></div>
> </form>
> </body>
> </HTML>
>
>
> **************
> **************
> The text.aspx page is simply this for the code behind:
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> If Server.HtmlEncode(Request.QueryString("WBS")).ToString =
> "1.2.8.5.001" Then
> Response.Write("Please enter another WBS!")
> Else
> Response.Write("You can use this one!")
> End If
> End Sub

 

[Submit Comment]Home