  | 
                       | 
          
            
               
                 Code (PHP) 
<script>
function popupsearch3(module,table,field,field1,output,output1, ref,title){
			w = screen.availWidth;
			h = screen.availHeight;
			var popW = 650, popH = 400;
			var leftPos = (w-popW)/2, topPos = (h-popH)/2;
		
			window.open("position_list.php?table="+table+"&module="+module+"&field="+field+"&field1="+field1+"&output="+output+"&output1="+output1+"&ref="+ref+"&title="+title,"loadorder","width="+popW+",height="+popH+",top="+topPos+",left="+leftPos+",menubar=no,resizeable=yes,toolbar=no,scrollbars=yes");
}	// end function
	
	
</SCRIPT>
<tr>
 <td colspan="4" align="left" valign="top">3.     ชื่อตำแหน่งงานที่ทำ (ระบุ)   
 <label>
<input name="TxtQN_POS_ID" type="hidden" id="TxtQN_POS_ID" value="TxtQN_POS_ID"/>
<input name="TxtPOS_NAME" type="text" id="TxtPOS_NAME" size="40"  readonly="readonly"/>
 <img src="search.gif" width="23" height="20" align="absmiddle" alt="เลือกตำแหน่งงาน" style="cursor:hand;"
onClick="popupsearch3('position','POS_ID','POS_NAME',frmmain.TxtQN_POS_ID.value,frmmain.TxtPOS_NAME.value, '','ตำแหน่งงาน')" />
</tr>
 
 
 
 
Code (PHP) 
position_list.php 
 
<script>
function selectitem(field,field1,output,output1){
	eval("self.opener." + output +".value='"+field+"'");
	eval("self.opener." + output1 +".value='"+field1+"'");
	window.close();			
}
</script>
<html><head><title>ค้นหาตำแหน่งงาน</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 </head>
<body><table><tr><td >
<!------------------------------------------------ Start For Code ------------------------------------------------>
<TABLE  width="550" class="tabshow" align="center">
			<TR class="tabshowhead">
				<TD align="center" width="100">รหัส</TD>
				<TD align="center" width="450">รายการ</TD>
			</TR>	
			
<?
include("config.inc.php");
mysql_connect($host,$user,$pwd);
mysql_select_db($dbname);
$result = mysql_query("select * from ref_qn_position") or die ("Err Can not to result") ;
while ($dbarr = mysql_fetch_array($result)) {
?>
			 <TR class="tabshowsoft" onmouseover=this.style.backgroundColor="#E8F3FF" onmouseout=this.style.backgroundColor="" style="cursor:pointer; " 
			 onClick="selectitem('<?php $dbarr['POS_ID'] ; ?>','<?php $dbarr['POS_NAME'] ; ?>','frmmain.TxtQN_POS_ID','frmmain.TxtPOS_NAME')">
				<TD align="center" width="100" valign="top"><?php echo $dbarr['POS_ID'] ; ?></TD>
				<TD align="center" width="450">    <?php echo  $dbarr['POS_NAME'] ; ?></TD>
			</TR>
				
			<?}?>
		</table>
		
		
		<table width="100%" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td> </td>
    <td><div align="center">
      <input type="button" name="Button" value="ปิดหน้าต่างนี้" onClick="window.close();" />
    </div></td>
    <td> </td>
  </tr>
</table>
		</body></html>
                        
               
               | 
             
            
              
			                                
              
                
                     | 
                     | 
                     | 
                 
                
                     | 
                  
                      
                        | Date :
                            2009-11-26 13:24:57 | 
                        By :
                            puybc484 | 
                         
                    | 
                     | 
                 
                
                     | 
                     | 
                     | 
                 
                | 
             
           
			         | 
             |