Loading...

Problems with events

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Problems with events

Postby Ivan » Tue Aug 19, 2008 2:35 pm

Hi!
How can one attach to GdViewer events from javascript in runtime?
The following doesn't work:
<SCRIPT LANGUAGE="javascript">
var viewer = document.getElementById("MyGdViewer");
viewer.ClickControl = function ()
{
alert("Test");
}
</SCRIPT>
Ivan
 
Posts: 2
Joined: Tue Aug 19, 2008 2:28 pm

Re: Problems with events

Postby Loïc » Tue Aug 19, 2008 3:51 pm

Hi,

I don't know how to catch events using javascript but you can find a way to do it in vbscript thought this online sample: http://www.gdpicture.com/samples/image-processing.html



Code: Select all
<object id="MyGdViewer"
            type="application/x-oleobject"
            classid="CLSID:F48DE781-C525-44C9-9529-C5ADE3EF5F70"
            width=745
            height=520
            standby="Loading GdPicture Imaging SDK"
            codebase="http://www.gdpicture.com/pub/gdpicturepro5.cab#Version=5,3,0,0">
            <param name="BackColor" value="255">
            <param name="BorderStyle" value="1">
            <param name="ZoomMode" value="2">
            <param name="LicenseKey" value="Your_License_KEY_Here">
            Your browser cannot activate this GdPicture Imaging SDK control.
</object>



<SCRIPT LANGUAGE="VBScript">
Sub MyGdViewer_PageChange
   document.getElementById("currentpage").innerText =  MyGdViewer.CurrentPage & "/" & MyGdViewer.PageCount
End Sub
</SCRIPT>


Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Problems with events

Postby Ivan » Tue Aug 19, 2008 4:24 pm

Thank you for fast answer, but the problem is that we can not use vbscript. We need a solution, suitable for javascript.
Ivan
 
Posts: 2
Joined: Tue Aug 19, 2008 2:28 pm


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest