I have a site developed on a server in the US, Unix based…works like a charm. Client asked to develop the same on a server in the Bahamas, NT based…everything is fine EXCEPT for the child/parent window relationship. In trying to debug this whole parent/child thing I noticed the following:
the below routine (all lines) in child simply takes the values from the parent and child, adds them up and if the total exceeds 100 you get the alert message…this works on the domestic site just fine, not the offshore site…however, if I strip out code line 4, (result=+=opener…)then run, the alert comes up! So it seems that the reference to opener.document.forms[0] when you’re in the child window doesn’t work….in the parent window (i.e., main form), a variant of the same routine is present BUT code line 5 (result=+=document.childForm1…) doesn’t exist…routine works fine under both domains so I’m guessing when you’re in the parent window the reference opener.document.forms[0] is legit… I thought maybe trying to name the parent window, then reference the name in child…NO GO. Is this all happening because of NT vs Unix server??? Thoughts please. DESPERATE!
“<script language=”JavaScript”>
function sum(objRef) {
var result = 0;
result += opener.document.forms[0].CndnFBpc.value – 0;
result += document.childForm1.cf1f.value – 0;
if (result > 100)
alert(“Your total percent allocation exceeds 100%…please check your percent distributions”);
}</script>”
Thanks,
Ron