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. Doubt

Doubt

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

    Following is the code to clear all text boxes. But It won't be clear when the textbox is "Multiline". Please give the solution as soon as possible. function ClearTextBoxes() { for (i=0;i < document.Form1.elements.length;i++) { if (document.Form1.elements[i].type == "text") document.Form1.elements[i].value=""; } }

    _ R 2 Replies Last reply
    0
    • J jayarajmrj

      Following is the code to clear all text boxes. But It won't be clear when the textbox is "Multiline". Please give the solution as soon as possible. function ClearTextBoxes() { for (i=0;i < document.Form1.elements.length;i++) { if (document.Form1.elements[i].type == "text") document.Form1.elements[i].value=""; } }

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Please don't repost.

      Best Regards, Apurva Kaushal

      1 Reply Last reply
      0
      • J jayarajmrj

        Following is the code to clear all text boxes. But It won't be clear when the textbox is "Multiline". Please give the solution as soon as possible. function ClearTextBoxes() { for (i=0;i < document.Form1.elements.length;i++) { if (document.Form1.elements[i].type == "text") document.Form1.elements[i].value=""; } }

        R Offline
        R Offline
        Rakheesh Chalil
        wrote on last edited by
        #3

        Hi, While rendering to HTML, multiline textbox will be considered as text area. So if you can consider the same in the condition specified, then it will work fine The code is given below function ClearTextBoxes() { for (i=0;i < document.Form1.elements.length;i++) { if (document.Form1.elements[i].type == "text" ||document.Form1.elements[i].type == "textarea" ) { document.Form1.elements[i].value=""; } } } hope this will work for you Rakheesh

        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