Answer by Nasser Torabzade for Capture window state in a form,

I'm not sure, but this might be the answer: try to add your hidden field statically to html, with a null value. then set its value dynamically using jQuery:

<td align='left' width='100'>
<form action='print_plan.php' method='post' name='printplan' target='_blank'>
<input type='hidden' id='PlanNo' name='PlanNo' value='13' />
<input type='hidden' id='IDuser' name='IDuser' value='1' />
<input type='hidden' id='detCols' name='detCols' value='' />
<input name='Submit' type='image' value='print' title='Print Plan'  src='images/print.gif'
           alt='Print Plan' onclick='detailCols()' />
</form>
</td>

jQuery

$(document).ready(function(){
    $("#detCols").val(details);
});

Leave a Reply

Your email address will not be published. Required fields are marked *