}
function get_contentWindow(frame) {
- netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
- if (frame && frame.contentWindow) {
- if (typeof frame.contentWindow.wrappedJSObject != 'undefined') return frame.contentWindow.wrappedJSObject;
- return frame.contentWindow;
- } else {
- return null;
- }
+ try {
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ if (frame && frame.contentWindow) {
+ try {
+ if (typeof frame.contentWindow.wrappedJSObject != 'undefined') return frame.contentWindow.wrappedJSObject;
+ } catch(E) {
+ alert("Error with get_contentWindow("+frame+") and wrappedJSObject:" + E);
+ }
+ return frame.contentWindow;
+ } else {
+ return null;
+ }
+ } catch(E) {
+ alert("Error with get_contentWindow("+frame+"): " + E);
+ }
}
function update_modal_xulG(v) {
$('renewal').value = r || 'No';
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
- get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
+ $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY + '?copy_id=' + r_circ.target_copy());
+ //get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
$('copy_summary').hidden=false;
g.network.simple_request(
$('due').value = r_circ.due_date() ? r_circ.due_date().toString().substr(0,10) : '';
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
- $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY); // + '?copy_id=' + r_circ.target_copy());
- get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
+ $('copy_summary').setAttribute('src',urls.XUL_COPY_SUMMARY + '?copy_id=' + r_circ.target_copy());
+ //get_contentWindow($('copy_summary')).xulG = { 'copy_id' : r_circ.target_copy() };
$('copy_summary').hidden=false;
g.network.simple_request(