Problem with required field validator.

hello,

I have one page in which submit and reset buttons are there and there are some fields which are required to be filled.Reset is my html input control in which i have retun on onclick "document.Form1.Reset()" .

Now my problem is when i click on submit withouth entering required data the validator message will be displayed but on click o Reset only textbox becomes empty but RFV messages remains still there.How to avoid/remove that ????

thanks,
NIKHIL.

Comments

  • I didnt try it, but just a suggestion, have you tried to disable the validators? or set validate = false for them on reset? or something?
    R. Thomas

    [size=1][COLOR=blue]"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."[i]1Thess. 5:16-18[/i][/color][/size]

  • : I didnt try it, but just a suggestion, have you tried to disable the validators? or set validate = false for them on reset? or something?
    : R. Thomas
    :
    : [size=1][COLOR=blue]"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."[i]1Thess. 5:16-18[/i][/color][/size]
    :
    :
    well thanks for ur suggestion,
    Ya i tried that.In javascript i took Page_Validators array which will be generated by asp.net but disabling rather making its visible false will not solve the problem because when another servers side controls left empty its validation will fire and at that time that will be invisible.So to make it visible again we need to write javascript and i am having one grid in which edit template is there and we cant handle it in javascript..hope u got my problem ?
  • try ReLoad Methrod?



  • on the click event of Reset button set the visibility of RFV as false or set the Display type property of the RFV as Dynamic


  • hi..

    try out this... in a java script function and call that function in reset button click event as



    function fun1()
    {
    document.Form1.reset();
    document.all["ValidationSummary1"].style.display='none';
    }







    : hello,
    :
    : I have one page in which submit and reset buttons are there and there are some fields which are required to be filled.Reset is my html input control in which i have retun on onclick "document.Form1.Reset()" .
    :
    : Now my problem is when i click on submit withouth entering required data the validator message will be displayed but on click o Reset only textbox becomes empty but RFV messages remains still there.How to avoid/remove that ????
    :
    : thanks,
    : NIKHIL.
    :







  • Use the property of the asp button CausesValidation="false"
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories