﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SmartCode Web Forum » SmartCode ViewerX VNC Viewer ActiveX » General Discussion  » Problem using OpenFileTransfer in HTML code</title><generator>InstantForum 2017-1 Final</generator><description>SmartCode Web Forum</description><link>https://www.s-code.com/forum/</link><webMaster>SmartCode Web Forum</webMaster><lastBuildDate>Mon, 16 Nov 2026 08:38:31 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem using OpenFileTransfer in HTML code</title><link>https://www.s-code.com/forum/post/3135</link><description>I'm trying to create a button that opens the File Transfer window, but I've been unsuccessful so far.&lt;br/&gt;&lt;br/&gt;Here's the button itself:&lt;br/&gt;&lt;br/&gt;[code]&amp;lt;input &amp;#111;nclick="OnXfer()" type="button" value="File Transfer"&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;Here's the javascript for the button:&lt;br/&gt;&lt;br/&gt;[code]function OnXfer() {&lt;br/&gt;&amp;nbsp;&amp;nbsp; &amp;#119;indow.ViewerX.OpenFileTransfer()&lt;br/&gt;}[/code]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;And here's how I define the object I'm manipulating:&lt;br/&gt;&lt;br/&gt;[code]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;OBJECT id="ViewerX" style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid"&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;width="1022" height="639" classid="CLSID:62FA83F7-20EC-4D62-AC86-BAB705EE1CCD" VIEWASTEXT CodeBase="viewerx.cab"&amp;gt;[/code]&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;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.&amp;nbsp; I always get the error "Object expected" when I call the OpenFileTransfer function.&lt;br/&gt;&lt;br/&gt;Any suggestions?&amp;nbsp; Also, HTML code examples are required as I can't translate other programming languages into the necessary HTML code.&amp;nbsp; Thanks!</description><pubDate>Mon, 02 Aug 2010 06:29:15 GMT</pubDate><dc:creator>Bonji</dc:creator></item><item><title>RE: Problem using OpenFileTransfer in HTML code</title><link>https://www.s-code.com/forum/post/3137</link><description>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.&amp;nbsp; Also, I renamed the cab file myself just for simplicity.&lt;br/&gt;&lt;br/&gt;Thanks!</description><pubDate>Mon, 02 Aug 2010 06:29:15 GMT</pubDate><dc:creator>Bonji</dc:creator></item><item><title>RE: Problem using OpenFileTransfer in HTML code</title><link>https://www.s-code.com/forum/post/3136</link><description>Hi, I just tested File Transfer via our Web VNC page and it works just fine.&lt;br/&gt;&lt;br/&gt;Most likely &amp;#119;indow.ViewerX in your code returns null object and that's why you are getting the error.&lt;br/&gt;Please double check this by running the page under a debugger.&lt;br/&gt;&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;One more thing CodeBase="viewerx.cab"&amp;gt;&lt;br/&gt;The cab file for ViewerX was renamed to scvncctrl.cab a long time ago.&lt;br/&gt;&lt;br/&gt;Please let me know if you need any additional assistance.</description><pubDate>Fri, 30 Jul 2010 19:20:11 GMT</pubDate><dc:creator>Yury Averkiev (s-code)</dc:creator></item></channel></rss>