Jump to content

Recommended Posts

Hi I have a table that shows a list of results and a script that runs when the complete button is pressed on a result ( it allows to enter a name before confirming the result)

It al works great when clicking the button on the first result in the table but wont work for any other result?

Hope someone can help


         
             <script>
               function requestRepairedBy()
               {
                  var repaired_by = prompt('Name of repairer');
                  if (repaired_by != null && repaired_by != "")
                  {
                      document.getElementById('repaired_by').value = repaired_by;
                  }
                  else
                  {
                      alert("Invalid repairer name");
                      return false;
                  }
               }         
             </script>

<form method="post" action="warehouse_summary.php?warehouse_id=<?php echo $warehouse_id; ?>&report_id=<?php echo $db_report_id;?>" 
            onsubmit="return requestRepairedBy()"
            />
            
              <input type="hidden" name="repaired_by" id="repaired_by" />
					  <tr>
						<td><a href="entrydisplay.php?report_id=<?php echo $db_report_id; ?>"><?php echo $db_dam_location; ?></a></td>
						<td><?php if($damage_level1 == 0){ echo ''; } else { echo $damage_level1; } ?></td>
						<td><?php if($damage_level2 == 0){ echo ''; } else { echo $damage_level2; } ?></td>
						<td><?php if($damage_level3 == 0){ echo ''; } else { echo $damage_level3; } ?></td>
						<td><?php if($damage_level5 == 0){ echo ''; } else { echo $damage_level5; } ?></td>
						<td><?php if($damage_level6 == 0){ echo ''; } else { echo $damage_level6; } ?></td>
						<td><?php if($damage_level7 == 0){ echo ''; } else { echo $damage_level7; } ?></td>
						<td><?php if($damage_level9 == 0){ echo ''; } else { echo $damage_level9; } ?></td>
						<td><?php if($damage_level10 == 0){ echo ''; } else { echo $damage_level10; } ?></td>
						<td><?php if($damage_level12 == 0){ echo ''; } else { echo $damage_level12; } ?></td>
						<td><?php if($damage_level11 == 0){ echo ''; } else { echo $damage_level11; } ?></td>
						<td><?php if($damage_level14 == 0){ echo ''; } else { echo $damage_level14; } ?></td>
						<td><?php if($damage_level13 == 0){ echo ''; } else { echo $damage_level13; } ?></td>
						<td><?php if($damage_level15 == 0){ echo ''; } else { echo $damage_level15; } ?></td>
						<td><?php if($damage_level16 == 0){ echo ''; } else { echo $damage_level16; } ?></td>
						<td><?php echo $db_damage_comment; ?></td>
						<td><?php echo $db_components; ?></td>
						<td><?php echo $locationEmpty; ?></td>
						<td><?php echo $db_no_positions; ?></td>

						<td><input type="submit" value="Complete" class="submitbutton" name="save" /></td>
					  </tr>
					  </form>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.