Okay I see the logic in that, however I am getting an error on page in the browser...
here is the js and the code as it stands now.
function openpopup4{
window.open(popUrl,"","")
<?php if ($line['desinit'] == 'AML' && $line['type'] == 'changes')
{
echo '<font size="2"><a href="javascript: openpopup4(\'../forms/contract_edit_changes_popup.php?idx=\'' . $line['contract_num'] . '\', \'Edit Contract\', \'width=435,height=450,scrollbars,top=40,left=40\'">' . $line['contract_num'] . '</a></font>';
}
elseif ($line['type'] == 'changes')
{
echo '<font size="2"><a href="javascript: openpopup4(\'../forms/contract_edit_popup.php?idx=\'' . $line['contract_num'] . '\', \'Edit Contract\', \'width=435,height=450,scrollbars,top=40,left=40\'">' . $line['contract_num'] . '</a></font>';
}
(Note: there's no space in my code between javascript: and openpopup4)