|
-
Dec 19th, 2006, 02:36 AM
#1
Thread Starter
Hyperactive Member
FieldValidators + Java
Hi all,
I have an ASP.NET form with plenty of textboxes to fill. If they are required or need some special kind of information, a field validator has been added. All works, but... I also have a WebControls.Button component added. in the 'onclick' event, I have added this JavaScript:
Code:
var answer = confirm('Update client address in workorder?');
if (answer)
{
document.forms(0).sInvoiceClientName.value = "a";
document.forms(0).sInvoiceDeptName.value = "b";
document.forms(0).sInvoicePersonName.value = "c";
document.forms(0).sInvoiceAddress.value = "d";
document.forms(0).sInvoiceZIP.value = "e";
document.forms(0).sInvoiceCity.value = "f";
document.forms(0).sInvoiceRegion.value = "";
document.forms(0).vInvoiceCountry.value = "NETHERLANDS";
document.forms(0).sInvoiceClientNameEnv.value = "g";
document.forms(0).sInvoiceDeptNameEnv.value = "g";
document.forms(0).sInvoicePersonNameEnv.value = "h";
document.forms(0).sInvoiceAddressEnv.value = "i";
document.forms(0).sInvoiceZIPEnv.value = "j";
document.forms(0).sInvoiceCityEnv.value = "k";
document.forms(0).sInvoiceRegionEnv.value = "";
document.forms(0).vInvoiceCountryEnv.value = "NETHERLANDS";
document.forms(0).bCopyWOInvoice.value = "False";
document.forms(0).bSendinvoiceinduplo.value = "False";
document.forms(0).b1Copyinvoiceotheraddress.value = "False";
document.forms(0).bInvoicetobestampedoriginal.value = "True";
document.forms(0).sInvoicecontactpersonName.value = "l";
document.forms(0).sInvoicecontactpersonFunction.value = "l";
document.forms(0).sInvoicecontactpersonEmail.value = "n";
document.forms(0).sInvoicecontactpersonTel.value = "0";
document.forms(0).sInvoicecontactpersonFax.value = "Telephone:0";
document.forms(0).mInvoice.value = "";
document.forms(0).sInvoiceConditions.value = "30 days ARI";
}
else
{
return false;
}
The problem is that when filling all of the fields through this JavaScript, all other fields with validators are also checked on their contents, resulting in plenty messages which fields are not filled correctly. How can I deny checking every control when firing this JavaScript?
Thanx in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|