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. Add values in the textboxes in javascript

Add values in the textboxes in javascript

Scheduled Pinned Locked Moved ASP.NET
questioncsharpjavascriptasp-netsysadmin
3 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.
  • B Offline
    B Offline
    billcodes
    wrote on last edited by
    #1

    hi, I have three textboxes and a button. When I click the button the numeric values in the textboxes should be added by javascript.If no value is entered in the textbox then it will not be added.I have using it in asp.net.The button should not be postback to the server. How can I do this ? Regards, Bill

    S M 2 Replies Last reply
    0
    • B billcodes

      hi, I have three textboxes and a button. When I click the button the numeric values in the textboxes should be added by javascript.If no value is entered in the textbox then it will not be added.I have using it in asp.net.The button should not be postback to the server. How can I do this ? Regards, Bill

      S Offline
      S Offline
      Samer Aburabie
      wrote on last edited by
      #2

      Do the following: - Use the property of the button OnClientClick="SumValues()" to do the summation on client side - Add a javascript function SumValues() for example and make it sum the text values, to get the value of each textbox use getElementById in javascript.

      Sincerely Samer Abu Rabie Imagination is more important than knowledge !

      1 Reply Last reply
      0
      • B billcodes

        hi, I have three textboxes and a button. When I click the button the numeric values in the textboxes should be added by javascript.If no value is entered in the textbox then it will not be added.I have using it in asp.net.The button should not be postback to the server. How can I do this ? Regards, Bill

        M Offline
        M Offline
        Manas Bhardwaj
        wrote on last edited by
        #3

        Learn Javascript[^]

        Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        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