Admin

Home > Linux > Programming > Javascript >

Setting a value using window.opener.form.field.value in FireFox - cosmocafe.net

Setting a value using window.opener.form.field.value in FireFox [Link] view:530

How about this?

function formOkToSubmit() {
  var memberlist = '';
  for (i=0; i<document.frmemaildistribution.members.

length; i++) {
    if (document.frmemaildistribution.members[i].checked) {
      memberlist = memberlist + document.frmemaildistribution.members[i].value + ',';
    }  
  }
  opener.document.frmemail.memberlist.value = memberlist;
  document.frmemaildistribution.doing.value = 'DONE';
  window.close();
}

If that works, the rationale for it working is that IE uses a bit of hack, letting you reference forms directly by their name.  Firefox doesn't have that hack/shortcut, so you have to remember to use document in front of the form names.  Hope that helps.
***document ¼Ó¼ºÀÌ µé¾î°¡¸é Fire fox¿¡¼­µµ Á¦´ë·Î ÀÛµ¿ÇÑ´Ù. (opera¿¡¼­µµ Àß µ¿ÀÛÇÑ´Ù)


opener property
Javascript plug in for the Pocket IE
javascript MD5

Back | Reload | Home | Forward

Created by Jae-Yeol Hwang

Last modified : 12:03 pm, 23 Mar 2007