The loadurl() function

Smartsite 7.9 - ...

The loadurl() extension function executes a http request to the specified url and returns the (html) string.

XML CopyCode image Copy Code
string exf:loadurl(string url)

Parameters:

  • url : the url to load.

Example

XML CopyCode image Copy Code
<html xmlns="http://www.w3.org/1999/xhtml" 
  xmlns:xf="http://www.w3.org/2002/xforms"  
  xmlns:exf="http://smartsite.nl/namespaces/xforms/1.0">
 <head>
  <title>Example</title>
  <xf:model>
   <xf:instance>
    <data xmlns="">     
    </data>
   </xf:instance>
  </xf:model>
 </head>
 <body>
  <xf:group ref="/data" appearance="full">
   <xf:label />
   <xf:output value="exf:loadurl('http://localhost/?id=LOOKUPFIELD&amp;field=body&amp;item=a')" />
  </xf:group>
 </body>
</html>


Namespace

This function is available (as of Smartsite 7.9) within the Smartsite XForms namespace (http://smartsite.nl/namespaces/xforms/1.0).