Created
April 1, 2014 19:42
-
-
Save ustun/9921552 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendIdToPopupOpener(win, chosenId) { | |
var name = windowname_to_id(win.name); | |
var elem = window.opener.document.getElementById(name); | |
if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { | |
elem.value += ',' + chosenId; | |
} else { | |
window.opener.document.getElementById(name).value = chosenId; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment