How python ActiveX to access DHTML document?

angel dai4happy at yahoo.com
Sat May 8 23:33:34 EDT 2004


Hi everyone

Thank you for your reply.
The use case is:
1) I wrote a com server(progid is PythonCom.Test)in Python. It works well.
2) The com server expose some method func1 func2 ...
3) In a html I wrote a jscript
var com = new ActiveXObject("PythonCom.Test");
com.func1(); // it's ok
com.func2(); //it's ok too.
4)Now I want my com server can access the html document directly.
I hope my com server can call
document.all.id1.innerText ="Hello world!"

I know the key is to get the html document's IDispatch. but how to do? I
have tried let a jscript call:
com.func3(document);
but the page report error.

Thanx again.
angel






More information about the Python-list mailing list