Hi
i'm trying to display a default value in a atext field then when user changes it im grabbing it in javascript and passing it as a hidden variable but it doesnt work
//javascript function
function save()
{
var imp = document.getElementById('yesno').checked;
document.getElementById("schdate").value = document.getElementById('nextsch').value;
if(imp == false)
{
<? $impt = 'N' ?>
}
else{
<? $impt = 'Y' ?>
}
alert ("date"+document.getElementById('schdate').value)
//when i alert it had value
}
//form
<form name="mainform" method="post" action="savesupdet.php?impt=<?= $impt ?>">
<td align='center' width='100'>
<input type='text' id='nextsch' name='nextsch' value='<?= $nextsch?>'> </input> </td>
<input type=hidden name=schdate id=schdate value = 'null'>
</table>
</form>
</body>
</html>
// savesupdet.php file
$cerll = $_POST['cerll'];
$nextsch = $_POST['schdate'];
$ta = $_POST['txta'];
$impt = $_GET['impt'];
echo $nextsch;
echo "<br>";
echo $cerll;
echo "<br>";
echo $ta;
echo "<br>";
echo $impt;
everything else gets posted though only this is a hidden field i tried everyting else can anyone help????????