all groups > vj# > april 2005 >
You're in the

vj#

group:

supports for com.ms.wfc.html


supports for com.ms.wfc.html Mariano
4/28/2005 10:32:09 AM
vj#:

According to Microsoft in:

http://msdn.microsoft.com/library/en-us/dv_vjsharp/html/vjgrfupgradingcomponentsthatusecommswfchtmlpackage.asp

Visual J# fully supports the com.ms.wfc.html package. However, the
parameters of the <OBJECT> tag have been changed to enable classes to be
loaded from managed assemblies in a version-aware manner.

Therefore, when upgrading Visual J++ 6.0 components that use the
com.ms.wfc.html package, the HTML pages that contain the <OBJECT> tag need to
be appropriately modified.

The <OBJECT> tag used in Visual J++ 6.0 is as follows:

<OBJECT CLASSID="java:com.ms.wfc.html.DhModule" height=0 width=0 ...
VIEWASTEXT>
<PARAM NAME=__CODECLASS VALUE=UserClass>
<PARAM NAME=CABBASE VALUE=UserCabFile.CAB>
</OBJECT>

The <OBJECT> tag that must be used in Visual J# is as follows:

<OBJECT CLASSID="CLSID:CF83EA5E-0FFD-4476-9BF7-6C15F7F8BDCF" height=0
width=0 ... VIEWASTEXT>
<PARAM NAME=CODECLASS VALUE=UserAssembly#UserClass>
</OBJECT>



But there exists another difference that Microsoft does not explain

With J++, to call to UserClass method of the new object from JavaScript we
include one 'id=Myobj' in the tag <OBJECT>

<OBJECT id=MyObj CLASSID="java:com.ms.wfc.html.DhModule" height=0 width=0
.... VIEWASTEXT>

And in JavaScript we do

<script language=JavaScript>
var Jcode;

function init() {
Jcode = MyObj.getDocumentObject();
Jcode.MyMetodo();
}
</script>

But in JSharp this does not work.

Why ????

How it is possible to call to a method of my object from JavaScript ????

Re: supports for com.ms.wfc.html gopikrishnam NO[at]SPAM gmail.com
5/9/2005 4:48:14 AM
You cannot call managed class methods from a script in wfc-html. You
can consider using J# Browser controls for this functionality though.
JBC fully supports script->applet->script calls and implements
netscape.javascript.* package.

Thanks,
GopiK[MSFT]
AddThis Social Bookmark Button