ParentForm에 동적으로 Div 생성
var obj = new Div();
obj.init("div_edit", 10, 10, 500, 500);
this.addChild("div_edit",obj)
obj.set_url("Study::ChildFrame01.xfdl");
obj.set_background('pink');
obj.show();
ChildForm에 fn_childForm() 함수 작성
this.fn_childForm = function (obj)
{
this.alert(obj);
};
ParentForm에 Id로 접근
var aa = "abcdefg"
this.div_edit.form.fn_childForm(aa);
*주의사항
접근 시 Div에 연결된 form이 완전히 로드된 후에 접근 가능하다
완전히 로드되는 시점은 childFrame의 onload 이벤트에서 확인할 수 있다
application 변수에 담은 후 ChildForm onload 이벤트에서 application 변수를 받아 사용할 수 있다
ParentForm에 작성
var obj = new Div();
obj.init("div_edit", 10, 10, 500, 500);
this.addChild("div_edit",obj)
obj.set_url("Study::ChildFrame01.xfdl");
obj.set_background('pink');
obj.show();
nexacro.getApplication().gv_word = "word";
ChildForm에 작성
var word = nexacro.getApplication().gv_word;
this.Edit02.set_value(word);
아하~