How to create a button with dynamic link to Web page

How to create a button with dynamic link to Web page

  • 22 Mai 2012 um 3:35 pm #19440
    Florian
    Mitglied

    Hi,

    I’m working on MoviconX² (10) and I would like to create a button with a dynamic link to a Web Page from Web Client.
    My goal is to open a PDF file from Internet Explorer with a link like this exemple :

    https://192.168.XXX.XXX/MyServerIISApplicationName/MyPDFFolder/MyPDFFile.pdf

    MyPDFFile.pdf is made from a string type variable.

    I would like to know how I can do this function ?

    Thanks a lot.

    Cordially,

    Florian

  • 23 Mai 2012 um 9:09 am #19441
    Anonym

    Hi,

    you coudl use some vb code like the one written below:

    Private Declare Function ShellExecute _
                                Lib ’shell32.dll‘ _
                                Alias ‚ShellExecuteA'( _
                                ByVal hwnd As Long, _
                                ByVal lpOperation As String, _
                                ByVal lpFile As String, _
                                ByVal lpParameters As String, _
                                ByVal lpDirectory As String, _
                                ByVal nShowCmd As Long) _
                                As Long

    Public Sub Click()
       Dim r As Long
       Dim VAR00001 as String
       VAR0001 = ‚MyPDFFile.pdf‘
       r = ShellExecute(0, ‚open‘, ‚https://192.168.XXX.XXX/MyServerIISApplicationName/MyPDFFolder/‘ & VAR00001, 0, 0, 1)
    End Sub

    Regards,
    Stosi
  • 23 Mai 2012 um 11:01 am #19442
    Florian
    Mitglied

    Hi,

    Firstly, I would like to thank you for your answer.

    I have tried your VB code and, if an other one want use this code, I would like to modify a little mistake (in red) :

    Private Declare Function ShellExecute _
                                Lib 'shell32.dll' _
                                Alias 'ShellExecuteA'( _
                                ByVal hwnd As Long, _
                                ByVal lpOperation As String, _
                                ByVal lpFile As String, _
                                ByVal lpParameters As String, _
                                ByVal lpDirectory As String, _
                                ByVal nShowCmd As Long) _
                                As Long
     
     
    Public Sub Click()
       Dim r As Long
       Dim VAR00001 as String
       VAR0001 = 'MyPDFFile.pdf'
       r = ShellExecute(0, 'open', 'https://192.168.XXX.XXX/MyServerIISApp...' & VAR00001, '0', '0', 1)
    End Sub

    The link is ok, but there is a problem…

    When I try my button on the server (on WebClientX), the PDF file is correctly open.
    When I try my button on an other computer with WebClientX, the PDF file is open on the server and not on the Web viewer :/

    How I can do !

    Secondly, I would like to know if we can use Androïd OS to use WebClientX. 

    Many thanks.

    Cordially,

    Florian
     

  • 24 Mai 2012 um 2:43 pm #19443
    Anonym

    hi,

    I’m sorry but bydesign the code run at server side, is not possible to manage any kind of link inside the applet at Client side due to java security restriction. The only way to open a link at client side, is to add a button/link in the html page that host the applet.

    e.g.:

    ..

  • 24 Mai 2012 um 3:39 pm #19444
    Florian
    Mitglied

    Hi,

    Many thanks for your help, I can close this topic.

    Best regards,

    Florian

Du musst angemeldet sein, um auf dieses Thema antworten zu können.