Problem using OpenFileTransfer in HTML code


Author
Message
Bonji
Bonji
Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)
Group: Forum Members
Posts: 10, Visits: 21
I'm trying to create a button that opens the File Transfer window, but I've been unsuccessful so far.

Here's the button itself:

<input onclick="OnXfer()" type="button" value="File Transfer">


Here's the javascript for the button:

function OnXfer() {
   window.ViewerX.OpenFileTransfer()
}



And here's how I define the object I'm manipulating:

   <OBJECT id="ViewerX" style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"
    width="1022" height="639" classid="CLSID:62FA83F7-20EC-4D62-AC86-BAB705EE1CCD" VIEWASTEXT CodeBase="viewerx.cab">



It seems to me that the ViewerX object is using the ISmartCodeVNCViewer interface when I actually need to use the ISmartCodeVNCViewer2 interface because that is the one that contains the OpenFileTransfer method.  I always get the error "Object expected" when I call the OpenFileTransfer function.

Any suggestions?  Also, HTML code examples are required as I can't translate other programming languages into the necessary HTML code.  Thanks!
Yury Averkiev (s-code)
Yury Averkiev (s-code)
Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)Supreme Being (223K reputation)
Group: Administrators
Posts: 1.9K, Visits: 3.6K
Hi, I just tested File Transfer via our Web VNC page and it works just fine.

Most likely window.ViewerX in your code returns null object and that's why you are getting the error.
Please double check this by running the page under a debugger.

Just to let you know, when an ActiveX is instantiated in IE, it will return pointer to its "default" interface. Default interface for the current version of ViewerX is ISmartCodeVNCViewer3.

One more thing CodeBase="viewerx.cab">
The cab file for ViewerX was renamed to scvncctrl.cab a long time ago.

Please let me know if you need any additional assistance.

http://www.s-code.com/App_Themes/Default/images/blue_line.gif
Regards,
Yury Averkiev, SmartCode

Bonji
Bonji
Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)Supreme Being (1.1K reputation)
Group: Forum Members
Posts: 10, Visits: 21
I figured out I'm using a version that is quite a bit older than the latest release, and the latest version has all methods available in the default interface.  Also, I renamed the cab file myself just for simplicity.

Thanks!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Explore
Messages
Mentions
Search