JavaScript Get ROW ID in a HTML Table to use in a modal jQuery; PHP html table modal,html table inside modal,html table in

So this time I have a HTML table and when I click in a anchor that is located in a tag it opens a modal, where we can change a user password.

But to update the password in the users table I need to get the ID. My problem is, how can I get the row ID/user ID in the modal.

My table is created trough a for:

for ($i = 0; $i < $size; $i++) {
print ("
<tr>
<td>".$Users[$i][0]."</td>
<td>".$Users[$i][1]."</td>
<td>*****</td>
<td><a data-modal-id='delete' target='_blank' href='#' >Change PW</a></td>
</tr>
<tr>");
}

So when I click the anchor the modal opens and I can manage to get the modal to work. What I need is somehow to get the ID to build the SQL query to update the password.

The modal:

      <header>
        <h3>Alterar Password</h3>
      </header>

      <div class="modal-body">

        <form action="" method="POST" id="changepw" name="changepw">            
            <label>Nova Password:</label><br/>
            <input class="textbox" type="password" name="newpassword" id="newpassword" /> <br/>

            <input class="btnSubmit" type="submit" name="changepwSub" id="changepwSub" form="changepw" value="Alterar Password" />          
        </form>         
      </div>

      <footer>
        <a target='_blank' href="#" class="js-modal-close"><input class="btnSubmit" type="button" value="Fechar" style="max-width:100px;" /></a>
      </footer>

      <?php

       //The PHP Code to Update it will be here.
        $query = "UPDATE auth SET password=xxx WHERE ID="

       ?>  
    </div>
Answer:1

I have a few html pages that share the same navbar. Therefore I wrote one html file - topnav.html and I used the following jQuery code to load it into every page. javascript <script type="text/...

I have a few html pages that share the same navbar. Therefore I wrote one html file - topnav.html and I used the following jQuery code to load it into every page. javascript <script type="text/...

Within a redux saga I am sending a half dozen fetch requests to different systems. I want to wait until all those requests return, then do some final processing on the results. To this end I have an ...

Within a redux saga I am sending a half dozen fetch requests to different systems. I want to wait until all those requests return, then do some final processing on the results. To this end I have an ...

I would like to change my navigationbar background color , but return to me : TypeError: Object is not a function(evaluating 'renderHeader'); How can i fix this error? static navigationOptions = ({...

I would like to change my navigationbar background color , but return to me : TypeError: Object is not a function(evaluating 'renderHeader'); How can i fix this error? static navigationOptions = ({...

  1. react native navigation bar height
  2. react native navigation bar example
  3. react native navigation bar color
  4. react native navigation bar hide
  5. react native navigation bar style
  6. react native navigation bar title
  7. react native navigation bar right button
  8. react native navigation bar bottom
  9. react native navigation bar shadow
  10. react native navigation bar background image
  11. react native navigation bar back button
  12. react native navigation bar android
  13. react native navigation bar custom
  14. react native navigation bar transparent
  15. react native navigation bar background color
  16. react native navigation bar left button
  17. react native navigation bar tutorial
  18. react-native-navigation-bar npm
  19. react native navigation bar image
  20. react native navigation bar blur

Hide show only works on first element, Once cloned stopped working. FIDDLE HERE : https://jsfiddle.net/rmpLvx7h/18/ On click on Image , Images should show in the particular div ( clicked element /....

Hide show only works on first element, Once cloned stopped working. FIDDLE HERE : https://jsfiddle.net/rmpLvx7h/18/ On click on Image , Images should show in the particular div ( clicked element /....