Finding that the request.form collection when checked on the called form is empty.
No idea as to err as no msg is displayed.
The base form is table listing the uploaded glaucoma screenings. In the table, I've added a column displaying an html input button that contains the record ID for that patient.
Various code pieces explained below.
Appreciate your comments/suggestions as I'm going bald and getting frustrated. Moving onto something else such as setting up 2 pc's...
This is the form code and a hidden field into which I place the value of the button clicked. This is I can use this value (recID) in subsequent SQL statements to retrieve the data stored in several MySQL tables associated with the patient record.
<form method="post" EncType="Multipart/Form-Data" action="http://localhost/secureeyespec/esgl001e.asp"
id="frmSelectScreen" name="frmSelectScreen" onsubmit="return form_validator();">
<input type="hidden" id="btn_clicked" name="btn_clicked" value="">
This is the button code being used.
<td width="50" align="center">
<input style="width: 4em;" type="submit" id="<%= btnName %>"
name="<%= btnName %>" size="150px" onclick="screenselected(this);"
maxlength="150" value="<%= recID %>">
Even added an HTML text field that is not visible via CSS instead of hidden field as a test - nothing was send over.
// purpose: check to see if hidden field value contains
// value of btn clicked
var hidField = document.getElementById('btn_clicked');
alert("Value of btn_clicked = " + hidField.value);
if (hidField.value != "")
alert("Value of btn_clicked NOT equal to empty string = " + hidField.value);
alert("Value of btn_clicked IS equal to empty string = " + hidField.value);
// purpose: pass to hidden field the patientID value
// obtained from the button value
var btnName = elem;
alert("btnName = " + btnName.name);
var theID = btnName.value;
alert("btnName value = " + theID);
// set hidden field value
var theField = document.getElementById('btn_clicked');
theField.value = theID;
alert("Hidden field (btn_clicked) value = " + theField.value);
// now setting the non visible text field
var nodisplay = document.getElementById('noDisplay');
nodisplay.value = theID;
alert("Text field (noDisplay) value = " + nodisplay.value);