Connecting Tech Pros Worldwide Forums | Help | Site Map

window.opener issue with IE 7, Fire Fox 2.0 and Netscape 8

Newbie
 
Join Date: May 2007
Posts: 2
#1: May 31 '07
I have the following code which works correctly in IE 6, but in IE 7, Fire Fox 2.0 and Netscape 8 it does not work.

I have a main page where a button calls this pop-up and uploads a file once you click the attach it should upload file and close the window and send back control to Main page.. But it is not happening..

CODE:
=========

<script LANGUAGE="JavaScript">
if ((window.opener != null) && (! window.opener.closed))
{
if (window.opener.aeObjects[1].DOM.body)
{
var c = window.opener.aeObjects[1].DOM.body.innerHTML;
window.opener.document.TicketResponse.AttachID.val ue = #AttachID#;
window.opener.document.PassAttachID.AttachID.value = #AttachID#;
window.opener.document.TicketResponse.LineID.value = #LineID#;
window.opener.document.PassAttachID.LineID.value = #LineID#;
window.opener.document.PassAttachID.Message.value = c;
window.opener.document.PassAttachID.submit();
//window.opener.showattach('show');
window.close();
}
//if (window.opener.soEditor != null)
//{var c = window.opener.soEditor.DocumentHTML('GetHTML');

//window.opener.document.TicketResponse.AttachID.val ue = #AttachID#;
//window.opener.document.PassAttachID.AttachID.value = #AttachID#;
//window.opener.document.TicketResponse.LineID.value = #LineID#;
//window.opener.document.PassAttachID.LineID.value = #LineID#;
//window.opener.document.PassAttachID.Message.value = c;
//window.opener.document.PassAttachID.submit();
//window.opener.showattach('show');
//window.close();
//}
else
{
window.opener.document.TicketResponse.AttachID.val ue = #AttachID#;
window.opener.document.PassAttachID.AttachID.value = #AttachID#;
window.opener.document.TicketResponse.LineID.value = #LineID#;
window.opener.document.PassAttachID.LineID.value = #LineID#;
window.opener.document.PassAttachID.Message.value = window.opener.document.TicketResponse.Response.val ue;
//window.opener.document.PassAttachID.submit();
//window.opener.showattach('show');
window.close();
}
}
</script>

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Jun 1 '07

re: window.opener issue with IE 7, Fire Fox 2.0 and Netscape 8


What error messages are you getting?
Newbie
 
Join Date: May 2007
Posts: 2
#3: Jun 1 '07

re: window.opener issue with IE 7, Fire Fox 2.0 and Netscape 8


Quote:

Originally Posted by acoder

What error messages are you getting?

In IE 7, I get the Javascript warning at botton and it states

'window.opener.aeObjects.1' is null or not an object

In Firefox, it must be siomilar but don't know where to see that error...
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Jun 1 '07

re: window.opener issue with IE 7, Fire Fox 2.0 and Netscape 8


Quote:

Originally Posted by asadhkhan

In IE 7, I get the Javascript warning at botton and it states

'window.opener.aeObjects.1' is null or not an object

In Firefox, it must be siomilar but don't know where to see that error...

If you get the Firebug extension, it'll be very helpful for debugging.

What is aeObjects? Perhaps you could post the code in the parent window?
Newbie
 
Join Date: Jun 2007
Posts: 1
#5: Jun 1 '07

re: window.opener issue with IE 7, Fire Fox 2.0 and Netscape 8


I've have firebug installed and inspected the code. aeobjects in an array. Firebug is a wonderful product but yields no more insight than the standard firefox error console (at least in this case) :)
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#6: Jun 4 '07

re: window.opener issue with IE 7, Fire Fox 2.0 and Netscape 8


Quote:

Originally Posted by jjj0923

I've have firebug installed and inspected the code. aeobjects in an array. Firebug is a wonderful product but yields no more insight than the standard firefox error console (at least in this case) :)

Can you post the code in the parent window?

PS. are you a different person with (miraculously) the same problem or have you re-subscribed with a different name?
Reply


Similar JavaScript / Ajax / DHTML bytes