suppose that inserting a book to a database of books, and when loading the publisher, the publisher does not exist
i can go to the create page of publisher(with button in same page what open un new window, popUp), create the new publisher and return the new publisher?
when return, complete the field in the caller page (return array(‘code’=>‘999’) )
can be done?
thanks
I hope you understand me, i use google translate, jeje
If you are opening the new window as a popup, you can make your page to execute the following javascript:
<script language="javascript">
window.opener.getElementById('my_publisher_input').value = <?php echo $model->id; //the new id ?>
window.close();
</script>
It is just an example, the trick is in the "window.opener", that returns the "document" object from the opener page. So, you can develop other behaviors, as a recharge on dropdown, for instance.