Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with validation

Problem with validation

Scheduled Pinned Locked Moved ASP.NET
questionjavascripttoolshelp
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anujose
    wrote on last edited by
    #1

    i am calling one confirmation message written in javascript when clicking on a button.at the same time i am using one required field validater to check whether user has entered value on one textbox.but it is not fireing the validation control.if i remove the client side script then the validation control is wroking correctly on button click .how can i solve it?......

    P T 2 Replies Last reply
    0
    • A anujose

      i am calling one confirmation message written in javascript when clicking on a button.at the same time i am using one required field validater to check whether user has entered value on one textbox.but it is not fireing the validation control.if i remove the client side script then the validation control is wroking correctly on button click .how can i solve it?......

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      There's probably an error in your client-script script. You haven't posted your script, so I can't tell you what the problem is.

      Paul Marfleet

      A 1 Reply Last reply
      0
      • P pmarfleet

        There's probably an error in your client-script script. You haven't posted your script, so I can't tell you what the problem is.

        Paul Marfleet

        A Offline
        A Offline
        anujose
        wrote on last edited by
        #3

        Onclient click of button i have written return confirm('Stock is going to update.Do you want to continue?');

        1 Reply Last reply
        0
        • A anujose

          i am calling one confirmation message written in javascript when clicking on a button.at the same time i am using one required field validater to check whether user has entered value on one textbox.but it is not fireing the validation control.if i remove the client side script then the validation control is wroking correctly on button click .how can i solve it?......

          T Offline
          T Offline
          thomas_joyee
          wrote on last edited by
          #4

          Hi, I assume that your javascript validation function may be return a false value or may be it makes any error which prevent the further processing.

          Thomas

          A 1 Reply Last reply
          0
          • T thomas_joyee

            Hi, I assume that your javascript validation function may be return a false value or may be it makes any error which prevent the further processing.

            Thomas

            A Offline
            A Offline
            anujose
            wrote on last edited by
            #5

            if any error with javascript function it wouldn't be worked according to the selection.it is working correctly when i click ok and cancel

            T 1 Reply Last reply
            0
            • A anujose

              if any error with javascript function it wouldn't be worked according to the selection.it is working correctly when i click ok and cancel

              T Offline
              T Offline
              thomas_joyee
              wrote on last edited by
              #6

              Ok can you post that javascript function?

              Thomas

              A 1 Reply Last reply
              0
              • T thomas_joyee

                Ok can you post that javascript function?

                Thomas

                A Offline
                A Offline
                anujose
                wrote on last edited by
                #7

                Button JavascriptFunction function SubmitForm() { var msg= confirm('Stock is going to update.Do you want to continue?'); if(msg==true) { return true; } else { return false; } } TextBox Validation Control

                T 1 Reply Last reply
                0
                • A anujose

                  Button JavascriptFunction function SubmitForm() { var msg= confirm('Stock is going to update.Do you want to continue?'); if(msg==true) { return true; } else { return false; } } TextBox Validation Control

                  T Offline
                  T Offline
                  thomas_joyee
                  wrote on last edited by
                  #8

                  Ok can you comment that 'return false' statement and check your validator is working or not

                  Thomas

                  A 1 Reply Last reply
                  0
                  • T thomas_joyee

                    Ok can you comment that 'return false' statement and check your validator is working or not

                    Thomas

                    A Offline
                    A Offline
                    anujose
                    wrote on last edited by
                    #9

                    then it is working correctly

                    T 1 Reply Last reply
                    0
                    • A anujose

                      then it is working correctly

                      T Offline
                      T Offline
                      thomas_joyee
                      wrote on last edited by
                      #10

                      I think javascript function has a priority than validation controls. So if the function returns false, it will causes to stop all the other processing You have to change your logic

                      Thomas

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups