如果出现错误,则在表单提交后从弹出窗口显示所选值

I have one text-box when user click on it one popup window gets open which contains many radio options ,when user selects any one of them and click on submit button on form ,than value comes in that text-box ,but when user click on submit button and if error comes on form than that text-box value vanishes ,how can i restore it ? this the text-box code

<input  title="Enter Kind of work 1" 
        readonly="readonly"  
        onclick="if(this.value!=''){this.value='';opendrop();}else{opendrop();}" 
        id="other_work1" 
        name="other_work1" 
        type="text" 
        size="20" 
        maxlength="20"  
        onclick='opendrop()'
        <?php if (isset($errors)) { 
                  echo 'value="'.htmlentities(@$_POST['other_work1']).'"'; 
              } 
        ?>
>

this is function i am calling

function opendrop()
{
var popy= window.open('kind.php','popup_form','width=380 height=300 left=800 top=300');
}