ActiveX object from GWT

269 views
Skip to first unread message

Joy

unread,
Jan 22, 2007, 8:01:22 AM1/22/07
to Google Web Toolkit
I am trying to download an ATL Control using the following code.

String playerHTML= "<HTML>"+
"<BODY>"+
"<object id=\"XXXXX\" codeBase=\"mycab.cab#version=1,0,0,4\"
CLASSID=\"CLSID:BF1C6214-2C4C-4894-A059-2DC7B8F326E3\">"+
"</object>"+
"</BODY>"+
"</HTML>";

pnPlayerPanel=new HTMLPanel(playerHTML);
// Add the panel to RootPanel


When I tried to add this HTMLPanel to the RootPanel, I am getting a
JavaScript Error showing
"Unexpected call to method or property access"

Is it possible to download an activeX control by the above mentioned
method or any other way to do it?
I know a Frame widget can do it by specifying the URL contains download
code. But I need to pass some parameters which are dynamically
generated by GWT widgets.

Thanks in advance
Joy

Joy

unread,
Jan 23, 2007, 8:29:53 AM1/23/07
to Google Web Toolkit
It worked when I changed the code as follows.
HTML downloadHTML=new HTML( "<object id=\"XXXXX\"

codeBase=\"mycab.cab#version=1,0,0,4\"
CLASSID=\"CLSID:BF1C6214-2C4C-4894-A059-2DC7B8F326E3\">"+
"</object>");
And adding the HTML widget to the RootPanel.

Is it necessary to add widget to the RootPanel? Any problem in adding
it to a child widget of RootPanel?

Thanks and Regards
Joy

Dan Morrill

unread,
Jan 23, 2007, 9:56:49 AM1/23/07
to Google-We...@googlegroups.com

Hi, Joy!

I think your original problem was probably the <body> and <html> tags you had.  RootPanel.get() returns you a handle to essentially the <body> tag of your page already.  So what your original code was attempting to do was the same as:

<html><body><html><body><object></object></body></html></body></html>

If you try your original code, but removing the <html> and <body> tags from your string, it might work.  But, I am not an expert on ActiveX controls, so take my comment with a grain of salt.

- Dan

Joy

unread,
Jan 24, 2007, 5:42:31 AM1/24/07
to Google Web Toolkit
Thanks..
Now it is clear ..
Joy


On Jan 23, 6:56 pm, "Dan Morrill" <morri...@google.com> wrote:
> Hi, Joy!
>
> I think your original problem was probably the <body> and <html> tags you
> had. RootPanel.get() returns you a handle to essentially the <body> tag of
> your page already. So what your original code was attempting to do was the
> same as:
>
> <html><body><html><body><object></object></body></html></body></html>
>
> If you try your original code, but removing the <html> and <body> tags from
> your string, it might work. But, I am not an expert on ActiveX controls, so
> take my comment with a grain of salt.
>
> - Dan
>

> On 1/23/07, Joy <reach...@gmail.com> wrote:
>
>
>
>
>
> > It worked when I changed the code as follows.
> > HTML downloadHTML=new HTML( "<object id=\"XXXXX\"
> > codeBase=\"mycab.cab#version=1,0,0,4\"
> > CLASSID=\"CLSID:BF1C6214-2C4C-4894-A059-2DC7B8F326E3\">"+
> > "</object>");
> > And adding the HTML widget to the RootPanel.
>
> > Is it necessary to add widget to the RootPanel? Any problem in adding
> > it to a child widget of RootPanel?
>
> > Thanks and Regards

> > Joy- Hide quoted text -- Show quoted text -

Reply all
Reply to author
Forward
0 new messages