현재 사용자가 값을 입력 할 수있는 CHM 도움말 파일을 만들려고합니다. 그러면 lPARAM을 WM_TCARD로 보내는 단추가 생성됩니다.Javascript Onclick 이벤트를 사용하여 ActiveX Template Coach (TCard) 개체를 만들려고합니다.
현재 DOM Explorer에 따라 개체가 올바른 매개 변수로 만들어졌지만 올바르게 표시되지 않고 단추로 나타나지 않는 IE 11, 10, 9 & 8에서 테스트했습니다.
<body>
<button onclick="create_object();">Try it</button>
<input type="text" id="layout_enter" />
<button id=click_button99 onclick="click_new_object();">click</button>
<script>
function create_object() {
var new_obj = document.createElement("OBJECT");
new_obj.setAttribute("classid", "clsid:41B23C28-488E-4E5C-ACE2-BB0BBABE99E8");
new_obj.setAttribute("codebase", "HHCTRL.ocx#Version=4,72,8252,0");
new_obj.setAttribute("type", "application/x-oleobject");
new_obj.setAttribute("id", "object99");
document.body.appendChild(new_obj);
var layout_entered = "10," +
document.getElementById('layout_enter').value
var z = document.createElement("PARAM");
z.setAttribute("name", "Button");
z.setAttribute("value", "PP Sonic");
document.getElementById("object99").appendChild(z);
var y = document.createElement("PARAM");
y.setAttribute("name", "Command");
y.setAttribute("value", "TCard");
document.getElementById("object99").appendChild(y);
var x = document.createElement("PARAM");
x.setAttribute("name", "Image");
x.setAttribute("value", " ");
document.getElementById("object99").appendChild(x);
var w = document.createElement("PARAM");
w.setAttribute("name", "Item1");
w.setAttribute("value", layout_entered);
document.getElementById("object99").appendChild(w);
var v = document.createElement("PARAM");
v.setAttribute("name", "UseButton");
v.setAttribute("value", "TRUE");
document.getElementById("object99").appendChild(v);
var u = document.createElement("PARAM");
u.setAttribute("name", "UseIcon");
u.setAttribute("value", "TRUE");
document.getElementById("object99").appendChild(u);
}
function click_new_object() {
document.getElementById("object99").click();
}
</script>
</body>
어떤 도움이나 조언을 부탁드립니다. 난 아무것도 해결하지 못하는 ActiveX 용 인터넷 옵션의 보안 옵션을 이미 살펴 보았습니다. 이미 코드에있는 객체를 가지고 있다면 그 것이 나타납니다. 나는 그것이 대상과의 문제가 아니라 창조라는 것을 생각하게 만든다.
참고 : JQuery를 사용할 수 없습니다.
감사합니다.