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. new to asp.net simple question plz help me

new to asp.net simple question plz help me

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-nethelpquestion
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.
  • S Offline
    S Offline
    sindhutiwari
    wrote on last edited by
    #1

    hi my aim is to ask user to input a number and square it then want to display it in another text box ..with out postback of the page i have used a html button n tried but failed plz do let me know regards sindhu tiwari

    Merry Xmas

    R T 2 Replies Last reply
    0
    • S sindhutiwari

      hi my aim is to ask user to input a number and square it then want to display it in another text box ..with out postback of the page i have used a html button n tried but failed plz do let me know regards sindhu tiwari

      Merry Xmas

      R Offline
      R Offline
      rashidpervaiz08
      wrote on last edited by
      #2

      <html > <body> <script language="javascript"> function Square() { var tb1 = window.document.getElementById("tb1"); var tb2 = window.document.getElementById("tb2"); tb2.value = ""; if(tb1.value == "" || isNaN(tb1.value)) return; var temp = parseInt(tb1.value); tb2.value = temp * temp; } </script> <input type="text" id="tb1" name="tb1" /> <br /> <input type="text" id="tb2" name="tb2" /> <br /> <input type="button" value="Square" onclick="Square();"/> </body> </html>

      1 Reply Last reply
      0
      • S sindhutiwari

        hi my aim is to ask user to input a number and square it then want to display it in another text box ..with out postback of the page i have used a html button n tried but failed plz do let me know regards sindhu tiwari

        Merry Xmas

        T Offline
        T Offline
        Thats Aragon
        wrote on last edited by
        #3

        Hi Sindhu! Try this Javascript. function SQRT() { var value=Form1.inputText1.value; value = value * value; Form1.inputText2.innerText = value; } Regards.

        "If I were not myself, I would like to be somebody like myself." :)

        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