Ask a Question related to ASP.NET General, Design and Development.
-
dmedina #1
Validators and javascript
How I can from client javascript know when one of my
textboxes, Radio Button List, drop down box, etc...
Validated to False when submitting the form.
I can get the page_Isvalid==false but i need to know which
control is empty or not selected, so i can put the
cursor...
//Sample code
if (page_Isvalid==false){
if (txt_box1.value.length<1){
document.GetElementById('txt_box1').Focus()
}
}
The code above works great but I don't now how to approach
when i have a dropdownbox, radioButton list, etc...
Thanks,
dmedina
dmedina Guest
-
Validators
I gave up and just wrote my own validator to handle all my date validation. bill "J. Marcelo Barbieri" <mbarbieri@bf.com.br> wrote in message... -
Combo Box & Validators
Hi, I am trying to validate a form in Flex. The form is made up of many text input boxes and combo boxes. I can validate the text inputs quite... -
postback doesn't work with validators.!
I have a strange problem.. once I put any validators on my form, say a simple RequiredFieldValidator, then there is no postback happening. Even... -
Validators in version 1.1
We have a technique for our order process whereby we simply turn panels on and off to capture data for the various stages, rather than the normal... -
how to enable the required validators in javascript
Jenet: Specify in the OnSubmit event of your FORM element the name of the javascript function you want to call. <form method=post... -
William F. Robertson, Jr. #2
Re: Validators and javascript
The way I do the DropDownList boxes is I have the selected item say
something like "make a selection" and it has a value of 0 (none of my other
values have a 0 value.) that value is hardcoded as part of the list. Yes I
did have to override the asp DropDownListBox to have this functionality, but
you could also do it by hand.
Then I step through it the same way you did with the TextBox except for the
list box.
if ( ddl_box1.value == "0" )
document.GetElementById( 'ddl_box1').focus()
HTH,
bill
"dmedina" <jayuya@cox.net> wrote in message
news:258601c33f26$fe2a5480$a601280a@phx.gbl...> How I can from client javascript know when one of my
> textboxes, Radio Button List, drop down box, etc...
> Validated to False when submitting the form.
>
> I can get the page_Isvalid==false but i need to know which
> control is empty or not selected, so i can put the
> cursor...
>
> //Sample code
> if (page_Isvalid==false){
> if (txt_box1.value.length<1){
> document.GetElementById('txt_box1').Focus()
> }
> }
>
> The code above works great but I don't now how to approach
> when i have a dropdownbox, radioButton list, etc...
>
>
> Thanks,
> dmedina
William F. Robertson, Jr. Guest



Reply With Quote

