XFormsBrowser.prototype = new XFormsControl; function XFormsBrowser (strParentId, strAlert, strHelp, strHint, strAccesskey, strClass, bDisabled, strId, nNavindex, strSrc, strStyle, strTag, strVisibility, strUserDefineAttrib) { XFormsControl.call(this, strParentId, strAlert, strHelp, strHint, strAccesskey, strClass, bDisabled, strId, nNavindex, strStyle, strTag, strVisibility, strUserDefineAttrib); this.attribute["src"] = strSrc; this.document; this.window; }; XFormsBrowser.prototype.init = function () { XFormsControl.prototype.init.call(this); this.document = this.m_heControl.contentWindow.document; this.window = this.m_heControl.contentWindow; this.resizeControl(); var strId = this.id; if (this.m_heControl.attachEvent) { this.m_heControl.attachEvent("onload", function() {XFormsBrowser.setIviewerDoc(strId);}); } else { this.m_heControl.addEventListener("load", function() {XFormsBrowser.setIviewerDoc(strId);}, false); } }; XFormsBrowser.prototype.setAttribute = function (strAttribute, strValue) { switch (strAttribute) { case "src": { this.attribute["src"] = strValue; this.m_heControl.src = strValue; break; } default: { break; } } }; XFormsBrowser.prototype.Stop = function () { if (is_ie) { this.m_heControl.contentWindow.document.execCommand('Stop'); } else { // TODO 동작확인 해야함. this.m_heControl.contentWindow.stop(); } }; XFormsBrowser.prototype.Refresh = function () { // TODO firefox 동작확인해야함 this.m_heControl.contentWindow.location.reload(false); }; XFormsBrowser.prototype.Navigate = function (strNewURL) { if (is_ie) { this.m_heControl.contentWindow.navigate(strNewURL); } else { this.m_heControl.contentWindow.location.href = strNewURL; } }; XFormsBrowser.prototype.GoBack = function () { // TODO firefox 동작확인해야함 if(history) { this.m_heControl.contentWindow.history.back(); } else { this.m_heControl.contentWindow.back(); } }; XFormsBrowser.prototype.GoForward = function () { // TODO firefox 동작확인해야함 if(history) { this.m_heControl.contentWindow.history.forward(); } else { this.m_heControl.contentWindow.forward(); } }; XFormsBrowser.create = function (strParentId, clAttribute, strStyle) { // 메인노드 생성 var xnBrowser = XFormsBrowser.createMainNode(clAttribute); var xnParent = document.getElementById("HE_"+strParentId); xnParent.appendChild(xnBrowser); // 하위노드 생성 xnBrowser = XFormsBrowser.createSubNodes(xnBrowser, clAttribute); // object 생성 return XFormsBrowser.createObject(strParentId, xnBrowser, clAttribute, strStyle); }; XFormsBrowser.createMainNode = function (clAttribute) { var xnBrowser = document.createElement("iframe"); xnBrowser = XFormsBrowser.createAttribute(xnBrowser, clAttribute); xnBrowser.frameBorder = "0"; return xnBrowser; }; XFormsBrowser.createSubNodes = function (xnBrowser, clAttribute) { return xnBrowser; }; XFormsBrowser.createObject = function (strParentId, xnBrowser, clAttribute, strStyle) { var bDisabled = false; var strId = ""; var nNavindex = 9007199254740992; var strSrc = ""; var strUserDefineAttrib = ""; for (var i=0; i