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. JavaScript
  4. Delete selected rows by table id using javascript

Delete selected rows by table id using javascript

Scheduled Pinned Locked Moved JavaScript
databasecsharpjavascripthelp
4 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.
  • U Offline
    U Offline
    User 8764454
    wrote on last edited by
    #1

    Hi All, I am using vb.net web application and in this application I create a dynamic table for displaying db query result. At this point, I want to use a javascript function which is called in Pageload. This function will delete selected rows by using table id. By the way there is no checkbox, linkbutton, etc... in the table. Thanks for your help,

    D G 2 Replies Last reply
    0
    • U User 8764454

      Hi All, I am using vb.net web application and in this application I create a dynamic table for displaying db query result. At this point, I want to use a javascript function which is called in Pageload. This function will delete selected rows by using table id. By the way there is no checkbox, linkbutton, etc... in the table. Thanks for your help,

      D Offline
      D Offline
      Deepak Kr1
      wrote on last edited by
      #2

      You can assign id to the TR element and when you want to delete the row then just set the innerText of that tr to '' blank. Hope this will help.

      U 1 Reply Last reply
      0
      • D Deepak Kr1

        You can assign id to the TR element and when you want to delete the row then just set the innerText of that tr to '' blank. Hope this will help.

        U Offline
        U Offline
        User 8764454
        wrote on last edited by
        #3

        Could you please an example? How can i handle the selected row id and how can i use innerText? Thanks,

        1 Reply Last reply
        0
        • U User 8764454

          Hi All, I am using vb.net web application and in this application I create a dynamic table for displaying db query result. At this point, I want to use a javascript function which is called in Pageload. This function will delete selected rows by using table id. By the way there is no checkbox, linkbutton, etc... in the table. Thanks for your help,

          G Offline
          G Offline
          Graham Breach
          wrote on last edited by
          #4

          Tables actually have some useful methods for this kind of thing - you can delete the rows by position using deleteRow()[^].

          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