1
0
-1

I am trying to load an html file stored relative to the runime folder into the HTML widget using $widgetoperation("loadURL")

I've tried the plain filepath, ./filepath, &filepath, &./filepath, &file://filepath, 

nothing appears to be working. 

Does someone know how to load a relative path into the widget. 

NOTE - I have the thing working at the moment by loading it as a full on URL from the tomcat web-server, and I suppose I could manage this, but I'd prefer a 'local' load. 


    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Perhaps :

      $fieldhandle(htmlwid)->$widgetoperation("loadURL",$concat("file://",$fileproperties("filepath","FULLPATH")))

      Gianni

      1. Iain Sharp

        This requires a $item("FULLPATH",$fileproperties("filepath","FULLPATH")) but does appear to work. 

        As it happens, I then hit an error trying to access stuff on that (complex) web-page. (I'm trying to implement the mozilla PDF.js code, as the default PDF viewer in the HTML5 widget is pants...) So I've reverted to using the web-server on the application server. 

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Hi Iain,

      you can read the workdir at runtime with $setting("usys", "[paths]workdir", "USYSDATA").

      So you can use

      $fieldhandle(HTML.TAB)->$widgetoperation("loadURL","file:%%$setting("usys", "[paths]workdir", "USYSDATA")%%%..\..\Programme\HTML\%%$componentname%%%.html")

      to load your Page.

      Regards

      Norbert

        CommentAdd your comment...