I have a table full of data and each row is a link that shows a hidden div (made to look like a popup) that has a form to edit the "remarks" category.
Normally I would pass the ID through to the next page that has the form in it to display the current remarks (from the database based upon the ID) in a text box for edit. Once the form is submitted it updates the database based upon the ID and redirects you back to the main page.
My problem comes in when I'm only using
to show the div and don't know of a way to pass the id of the row that has been clicked on to this form. Does anyone know how to do that (or maybe I'm making no sense).Code:onClick="showDiv()"
Some code that I'm using:
This pulls the data from the database to show my rows in my tables
Here's the code that gives me my mouse over clickable rowsCode:$DispQuery = "SELECT * FROM $MaxxForceInventoryTable " . $FilterVariable . "ORDER BY COLOR, $orderby $ascdesc"; $DispResult = mysql_query($DispQuery) or die(mysql_error().'<br />'); while ($Row = mysql_fetch_assoc($DispResult)) {
Here's showdiv()Code:ECHO "<TR BGCOLOR='" . $RowCOLOR . "' style='border-bottom-style: solid;' style='border-left-style: solid;' style='border-right-style: solid;' style=\"Cursor:Hand\" onClick=\"showDiv()\" onMouseOver=\"this.style.backgroundColor='#E4E7FF';\" onMouseOut=\"this.style.backgroundColor='" . $RowCOLOR . "';\">
Let me know if more info is needed. I cannot show the actual page as it is on an intranet site... Thanks in advance!Code:function showDiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'visible'; } else { // IE 4 document.all.hideshow.style.visibility = 'visible'; } } }






Bookmarks