in reply to Re^2: Passing perl variable as input name?
in thread Passing perl variable as input name?
Your print should be something like:
Now, the "submitted" page will receive
although, if you have multiple buttons with the same id (unit_name), you may get an array of values.
UPDATE:You should get the value of the button used to submit (Untested).
UPDATE 2Revising unsatisfactory answer.
The trick is to submit a different value for the same Name, via Javascript.
Untested: (You need to CREATE a Hidden form field with the name "unit_name")
print "<input type='image' name='$unit_name' alt=airConButton src='.. +/../images/unit.jpg' height='100px' width='100px' onclick='document.forms[0].unit_name.value =\"$unit_name\";this.form.s +ubmit()'>";
"Software interprets lawyers as damage, and routes around them" - Larry Wall
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Passing perl variable as input name?
by RobRobson (Novice) on Jul 22, 2016 at 10:04 UTC | |
by NetWallah (Canon) on Jul 22, 2016 at 14:16 UTC | |
by RobRobson (Novice) on Jul 22, 2016 at 14:30 UTC |