Hi, I am having trouble with this suggestion.
I have a popup window for creating a new order. In the new order window, I have a dropdown field that has a lookup to my client list. I wanted to create an option that if the client is a new client, my users could click on a link next to that field, to fill out the new client information. And then have that new record pass back as a parameter to the the order window.
But it doesn't pass back.
Both pages are located in the same domain.
This is the code in the new client datapage in the success message
<script>
var element_value ='[@InsertRecordClient_Rec_ID]';
var element_text ='[@InsertRecordName]';
var new_item = window.opener.document.createElement("option");
new_item.text = element_text;
new_item.value = element_value;
window.close();
try
{
window.opener.document.getElementsByName('InsertRecordOrder_Client_Rec_ID')[0].options.add(new_item, null);
}
catch(ex)
{
window.opener.document.getElementsByName('InsertRecordOrder_Client_Rec_ID')[0].options.add(new_item);
}
</script>
In the order window, in an html block
<a onclick="window.open('add-client-limited.html' , 'popup', 'width=307,height=341,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false">Add Option</a>
I would very much appreciate any suggestions as to what I'm missing. Thank you.