Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Validation client javascript error

Reply
Thread Tools

Validation client javascript error

 
 
Gary Varga
Guest
Posts: n/a
 
      08-27-2003
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
 
Reply With Quote
 
 
 
 
Mike Moore [MSFT]
Guest
Posts: n/a
 
      08-27-2003
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" <(E-Mail Removed)>
> Sender: "Gary Varga" <(E-Mail Removed)>
> Subject: Validation client javascript error
> Date: Wed, 27 Aug 2003 06:30:04 -0700
> Lines: 12
> Message-ID: <0d7001c36c9f$52f69f00$(E-Mail Removed)>
> 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
>


 
Reply With Quote
 
 
 
 
Gary Varga
Guest
Posts: n/a
 
      08-28-2003
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" <(E-Mail Removed)>
>> Sender: "Gary Varga" <(E-Mail Removed)>
>> Subject: Validation client javascript error
>> Date: Wed, 27 Aug 2003 06:30:04 -0700
>> Lines: 12
>> Message-ID: <0d7001c36c9f$52f69f00$(E-Mail Removed)>
>> 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
>>

>
>.
>

 
Reply With Quote
 
Mike Moore [MSFT]
Guest
Posts: n/a
 
      08-29-2003
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" <(E-Mail Removed)>
> Sender: "Gary Varga" <(E-Mail Removed)>
> References: <0d7001c36c9f$52f69f00$(E-Mail Removed)>

<(E-Mail Removed)>
> Subject: RE: Validation client javascript error
> Date: Thu, 28 Aug 2003 02:06:27 -0700
> Lines: 70
> Message-ID: <092301c36d43$a98dba20$(E-Mail Removed)>
> 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" <(E-Mail Removed)>
> >> Sender: "Gary Varga" <(E-Mail Removed)>
> >> Subject: Validation client javascript error
> >> Date: Wed, 27 Aug 2003 06:30:04 -0700
> >> Lines: 12
> >> Message-ID: <0d7001c36c9f$52f69f00$(E-Mail Removed)>
> >> 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
> >>

> >
> >.
> >

>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation Summary not showing for client side validation cwhankey@gmail.com ASP .Net 1 12-12-2008 02:32 AM
Page is not submitted using Client side validation of.NET validation Sudip ASP .Net Web Controls 0 07-01-2005 05:49 AM
Using both server side validation and client side validation =?Utf-8?B?dmlkeWE=?= ASP .Net 1 06-02-2005 09:45 PM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM
validation summary doesnt display when there's client-side validation Libs ASP .Net 0 06-25-2003 03:05 PM



Advertisments