Hi Gary,
Here's my understanding of your problem statement.
You have a custom validation control and you have customized your
WebUIValidation.js file. After posting your page, the new page fails with a
client script error related to a modified portion of WebUIValidation.js.
This portion of your code expects an array with one entry, but the array
has no entries.
---
I recommend that you use view source to examine what the browser is
receiving after the postback. Find the part that adds an entry to your
Page_ValidationSummaries array. Somewhere within this you should see how it
fails to add an entry to the array. This can then help you find what to
change in your code so that the javascript code is correct.
As part of this, I think you may want to create a new test page which is
simplified. Remove as much complexity as possible while still reproducing
the error.
I realize this isn't an answer, but I hop it helps.
Thank you, Mike Moore
Microsoft, ASP.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "Gary Varga" <MS**@VargaLtd.com>
Sender: "Gary Varga" <MS**@VargaLtd.com>
References: <0d****************************@phx.gbl>
<ql**************@cpmsftngxa06.phx.gbl> Subject: RE: Validation client javascript error
Date: Thu, 28 Aug 2003 02:06:27 -0700
Lines: 70
Message-ID: <09****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcNtQ6mL2pSZcg75QsavRpyOSTxcvg==
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:172224
NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
Thanks for the reply, Mike.
I have a control derived from ValidationSummary in a dll.
I used this in a user control and included it in a page.
This page is derived from a class which itself derives
from System.Web.UI.Page.
I can send you the dll and the updated WebUIValidation.js
document - yes I have added to this in one place, I added
a new display type - if you want.
Regards,
Gary
-----Original Message-----
Hi Gary,
In order to help you, I need to recreate this problem on
my own machine.What are the steps for setting up a page that will
generate this error?
Thank you, Mike Moore
Microsoft, ASP.NET
This posting is provided "AS IS", with no warranties,
and confers no rights.
-------------------- Content-Class: urn:content-classes:message
From: "Gary Varga" <MS**@VargaLtd.com>
Sender: "Gary Varga" <MS**@VargaLtd.com>
Subject: Validation client javascript error
Date: Wed, 27 Aug 2003 06:30:04 -0700
Lines: 12
Message-ID: <0d****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Thread-Index: AcNsn1L2OZnmTDrgR4SJMhBem5YJYA==
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:171846 NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
In the file WebUIValidation.js, when a postback that
doesn't fail the validation has a javascript error saying summary is undefined in the ValidationSummaryOnSubmit
function. Page_ValidationSummaries has a length of 1 but there are no array entries.
This is the line that fails:
summary.style.display = "none";
TIA,
Gary Varga
.