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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. javascript problem urgent

javascript problem urgent

Scheduled Pinned Locked Moved ASP.NET
helpjavascriptregextutorial
5 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.
  • V Offline
    V Offline
    venu656
    wrote on last edited by
    #1

    hai experts.. i have a regular expression validator which allows decimals with precesion 2 like 100.20 now when the user enters 100 and press tab it shuld automatically convert 100.00 it shuld not show error message .. plz guide regarding this issue

    C A 2 Replies Last reply
    0
    • V venu656

      hai experts.. i have a regular expression validator which allows decimals with precesion 2 like 100.20 now when the user enters 100 and press tab it shuld automatically convert 100.00 it shuld not show error message .. plz guide regarding this issue

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      This sounds like basic string mashing to me. What have you got so far ?

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      V 1 Reply Last reply
      0
      • C Christian Graus

        This sounds like basic string mashing to me. What have you got so far ?

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        V Offline
        V Offline
        venu656
        wrote on last edited by
        #3

        hi christian. actually i used regualr expression for decimals like it will take it as only 100.20 but when the user enters 100 it shuld be conevrt as 100.00 or 200 it shuld convert as 200.00 etc

        C 1 Reply Last reply
        0
        • V venu656

          hai experts.. i have a regular expression validator which allows decimals with precesion 2 like 100.20 now when the user enters 100 and press tab it shuld automatically convert 100.00 it shuld not show error message .. plz guide regarding this issue

          A Offline
          A Offline
          Arun Jacob
          wrote on last edited by
          #4

          venu656 wrote:

          when the user enters 100 and press tab it shuld automatically convert 100.00 it shuld not show error message

          I think you need to round your number to 2 digits while user press tab.right? Then just call a javascript method on focus out of textbox and do your rounding there. :)

          Arun Jacob http://codepronet.blogspot.com/

          1 Reply Last reply
          0
          • V venu656

            hi christian. actually i used regualr expression for decimals like it will take it as only 100.20 but when the user enters 100 it shuld be conevrt as 100.00 or 200 it shuld convert as 200.00 etc

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Right - so it has nothing to do with the validator at all. You just want to append one or two zeros and possibly a dot, based on what the user entered.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            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