You need to sign in to do that
Don't have an account?
yao yao
How to integrate ActiveX control in visualforce page
I upload an ActiveX control to static resource, and I write a visualforce page to embed this activex control.
But when i visit the page with IE browser, the browser can not prompt me to download the control.
I do not know why.
But when i visit the page with IE browser, the browser can not prompt me to download the control.
I do not know why.
NOTE: When adding code, please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.
Additionally, it does not look like you are using the Resource URL to point to your CryptoKit.Ulitmate.x64.cab file. I'm assuming this is what you added as a static resource? If so you'll want ot use the Resource methods [2] to include your file.
Do you have any errors in the browsers console? (like seeing a 404 for your cab file) Do you see the object tag in your rendered HTML?
[1] https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_page.htm
[2] https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_resources_reference.htm
<object id="CryptoAgent" codebase="{!URLFOR($Resource.CryptoKit32,'CryptoKit.Ultimate.x86.cab')}" classid="clsid:4C588282-7792-4E16-93CB-9744402E4E98"></object>
when i click the button:
<input type="button" name="SelectCertificateButton" value="Select certificate [选择证书]" onclick="SelectCertificateOnClick()"/>
the call CryptoAgent.SelectCertificate in the javascript throw exception, when i debugged, i find that the inner object of CryptoAgent is null.
If you open the javascript console and run the following do you get the expected object back?
I tried https://sso-ad-test-dev-ed.my.salesforce.com/resource/1448502182000/CryptoKit32/CryptoKit.Ultimate.x86.cab in my dev org, it return "http 404 not found" . but:
<object classid="clsid:4C588282-7792-4E16-93CB-9744402E4E98"codebase="/resource/1448502182000/CryptoKit32/CryptoKit.Ultimate.x86.cab" id="CryptoAgent"></object>
is automatic generate by salesforce and my original code is:
<object id="CryptoAgent" codebase="{!URLFOR($Resource.CryptoKit32,'CryptoKit.Ultimate.x86.cab')}" classid="clsid:4C588282-7792-4E16-93CB-9744402E4E98"></object>
second question:
as i mentioned on last post, i can get CryptoAgent object normally, but for activex control, the inner object of CryptoAgent is null. This is my question, i do not know why.
when i run the demo(pure html page) provided by the activex control's vendor, ie prompt me to download the activex control and when i debugged,the inner object of CryptoAgent is not null.
the .cab file is:
you can give me your mailbox, i will send you the cab file.
<object id="CryptoAgent" codebase="{!URLFOR($Resource.CryptoKit32zip,'CryptoKit.Ultimate.x86.cab')}" classid="clsid:4C588282-7792-4E16-93CB-9744402E4E98"></object>