button on html

  1. 4 months ago

    ronaldo f

    Apr 7 Pre-Release Testers, Xojo Pro Philippines

    Hi Guys,

    I had an html page that is loaded to webhtmlviwer. There are lots of object in there
    My question Is it possible to detect click of a button from htmlviwer to xojo ?

    @ronaldoflorendo I tried you advise from webhtmlviewer with a google map. xojo dont catch any click in the map.
    Any advise?

    Do you have control of the Google Map code? If so, change your button code to call https://YourWebAppDomain.com/api/YourParams

    Then when you click you'll see App.HandleSpecialURL fire. :)

  2. Hal G

    Apr 7 Pre-Release Testers, Xojo Pro, XDC Speakers CampSoftware.com

    I don't think there's a direct way, but you can do it indirectly. :)

    You could have your button in the WebHTMLViewer call App.HandleSpecialURL using AJAX Post passing the data you want to pass along with the WebSession.Identifier and WebPage.Name.

    Then in App.HandleSpecialURL, use WebApplication.SessionWithIdentifier to find the session. Then use WebSessionContext to call a method on the Page that would pass the data from the button.

    It'd be incredibly helpful if we had more events for WebHTMLViewer.

  3. Michel B

    Apr 7 Pre-Release Testers, Xojo Pro RubberViews.com
    Edited 4 months ago

    @Hal G I don't think there's a direct way, but you can do it indirectly. :) .

    This is clever, but it works only if you created the page. If this is on another site, security will prevent accessing the content of the WebHTMLViewer.

  4. ronaldo f

    Apr 7 Pre-Release Testers, Xojo Pro Philippines

    I tried you advise from webhtmlviewer with a google map. xojo dont catch any click in the map.
    Any advise?

  5. Michel B

    Apr 7 Pre-Release Testers, Xojo Pro RubberViews.com

    This is precisely what I was explaining above. You cannot get to the content of a WebHTMLViewer when another site is displayed. It is an iFrame, and as such for security reasons, the content is protected.

    There is no way around.

  6. Hal G

    Apr 8 Pre-Release Testers, Xojo Pro, XDC Speakers Answer CampSoftware.com

    @ronaldoflorendo I tried you advise from webhtmlviewer with a google map. xojo dont catch any click in the map.
    Any advise?

    Do you have control of the Google Map code? If so, change your button code to call https://YourWebAppDomain.com/api/YourParams

    Then when you click you'll see App.HandleSpecialURL fire. :)

or Sign Up to reply!