Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 15th, 2007, 11:53 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , .
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript validation error in asp.net

Hey all, I guess close to make this work. when I click btn without entering any thing in all three boxes
it gives validation. When I enter in all three boxes, it goes to the server side but gives an
Object does not support this property or method. The button is in FromView


<script language="javascript" type="text/javascript">
function

Confirm()
{


if ((document.getElementById('ctl00$pageDetailPanel$F V_UpdateUser$txtCpwd').value == "") ||(document.getElementById('ctl00$pageDetailPanel$ FV_UpdateUser$txtNpwd').value == "") || (document.getElementById('ctl00$pageDetailPanel$FV _UpdateUser$txtConpwd').value == "")) {

var lvConfirm=alert("You cannot leave the boxes blank");


return false;
}



<asp:Button ID="Button1" runat="server" Text="Update Password" CausesValidation=true OnClientClick="return Confirm();" CommandName="select" OnClick="btnPasswordUpdate_Click" /></ td>

return true;

}


</

script>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while running javascript code in ASP.NET Pag fozia_izhar ASP.NET 1.0 and 1.1 Professional 2 December 20th, 2006 03:39 AM
ASP.NET Validation dayaananthanm ASP.NET 2.0 Professional 1 December 9th, 2006 09:13 AM
JavaScript form field validation error issue crmpicco Javascript How-To 4 July 4th, 2005 10:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.