h8ids
10-13-2006, 09:01 PM
Attempting to pass the value of a Javascript variable to a PHP variable.
The input field named MajorEdit3 does dynamically load a value based upon the user's listbox selection. It is that value which needs to be passed to the PHP variable.
The receiving page keeps returning the following:
[object HTMLInputElement]
So it recognizes there is data but it's failing to completely handle the request.
Anyone see what I'm missing here?
Sending page:
<input type="text" name="MajorEdit3" id="MajorEdit3" size="3">
<script>
var MajorRecords = document.getElementById("MajorEdit3");
document.write("<a href=\"DBEditMajor.php?record="+MajorRecords+"\"><input disabled type='submit' value='Save revisions' name='MajorRev' id='MajorRev' title='Store Major revisions' resolveData()></a>");
</script>
<?php
session_start();
echo $_GET['record'];
?>
The input field named MajorEdit3 does dynamically load a value based upon the user's listbox selection. It is that value which needs to be passed to the PHP variable.
The receiving page keeps returning the following:
[object HTMLInputElement]
So it recognizes there is data but it's failing to completely handle the request.
Anyone see what I'm missing here?
Sending page:
<input type="text" name="MajorEdit3" id="MajorEdit3" size="3">
<script>
var MajorRecords = document.getElementById("MajorEdit3");
document.write("<a href=\"DBEditMajor.php?record="+MajorRecords+"\"><input disabled type='submit' value='Save revisions' name='MajorRev' id='MajorRev' title='Store Major revisions' resolveData()></a>");
</script>
<?php
session_start();
echo $_GET['record'];
?>