Here are the modifications I made to get it to work for multiple fields. I
modified the link onclick command as follows:
<td class="InLineDataTD"><a class="InLineDataLink"
onclick='SetOpenerValue("{Company_Name}","{Contact_Name}","{Phone}","{Fax}",
"{Address1}","{Address2}","{City}","{State}","{Zip}","{Contractor_License_Nu
mber}","{ContractorAcctNumber}"); return false;'
href="{Company_Name_Src}">{Company_Name}</a> </td>
Then I modified SetOpenerValue to reflect the new fields.
function SetOpenerValue(CompName, ContactName, Phone, Fax, Address1,
Address2, City, State, Zip, LicNum, AcctNum)
{
window.opener.document.tblBuildingGeneral.ContractorBusinessName.value =
CompName;
window.opener.document.tblBuildingGeneral.ContractorName.value =
ContactName;
window.opener.document.tblBuildingGeneral.ContractorAccountNum.value =
AcctNum;
window.opener.document.tblBuildingGeneral.ContractorNCLicenseNo.value =
LicNum;
window.opener.document.tblBuildingGeneral.ContractorStreetNum.value =
Address1;
window.opener.document.tblBuildingGeneral.ContractorStreetName.value =
Address2;
window.opener.document.tblBuildingGeneral.ContractorCity.value = City;
window.opener.document.tblBuildingGeneral.ContractorState.value = State;
window.opener.document.tblBuildingGeneral.ContractorZip.value = Zip;
window.opener.document.tblBuildingGeneral.ContractorPhone.value = Phone;
window.opener.document.tblBuildingGeneral.ContractorFax.value = Fax;
window.opener.focus();
window.close();
}
This works, but it gives the CCS IDE problems. Once I modified the onclick
value, I no longer have access to modify any of the fields in the grid after
this field. The label markers disappear in the IDE. If I remove the onclick
code, I can make mods, then put the onclick code back in. Also, the IDE
duplicates lines of code inexplicably when changing from html view to design
view. The template markers get out of sync causing a failure in the parsing
engine (-1 subscript). I have to go back into html view and remove the
duplicated lines. I would publish here, but I have the form working and I
have spent more than 6 hours to figure out what was happening, so I don't
want to take a chance on screwing it up. Any ideas on a better way to
implement that will not cause the IDE problems.
"peterr" <
peterr@forum.codecharge> wrote in message
news:940300daa95de9@news.codecharge.com...
> Hi Don,
>
> I personally haven't work with such functionality, but looking at the HTML
of that pop-up page I see:
> function SetOpenerValue(EmpName)
> {
> window.opener.document.departments.department_manager_id.value =
EmpName;
> window.opener.focus();
> window.close();
> }
>
> I believe that you should be able to add references to additional fields
in there. Please try this for now.
>
> _________________
> Peter R.
> YesSoftware Support Representative
>
http://support.codecharge.com
> Warning: I use Google and CCS Docs/Examples in most of my answers
> ---------------------------------------
> Sent from YesSoftware forum
>
http://forums.codecharge.com/
>