iframe(interface)

The iframe tool lets you embed live web content on the page. It can be used for display purposes, and also as a mechanism to connect to survey sites passing variable values as appropriate. It is only available on the interface.

To place an iframe on the diagram

  1. Click on the dropdown to the right of the Graphics () or Shape () label in the build toolbar and select the iframe () tool. Once the tool is selected you can just click on (or use the dropdown to change back to the Graphics or Shape tool).
  2. Click the diagram to place the iframe. A selected rectangle will be placed on the diagram (when it is not selected the iframe object will not be visible as only its content is displayed).
  3. To select the content use the Properties panel and enter a url in the form <iframe src="https://exchange.iseesystems.com/public/isee/guns-at-school"/> (see properties below for more discussion).
  4. To move the iframe select and then drag it.
  5. To resize the iframe select it and drag one of the 6 handles that appear.

iframe Properties

You can specify a location and set values of passed parameters using variable values from the current simulation.

iframe embed code specifies what will be included using the <iframe> tag. If its simplest form, this can be <iframs src="url"/> where the URL can contain a location as well as parameters.

You can often get embed code ready for pasting using a Copy Embed Code command at a host site.

Parameters to append to URL

When the request is sent to load the requested web page you can add optional parameters (query parameters) that will take the form name=value as discussed below.

The parameters you include will then be appended to the specified URL using ? it there are not already query parameters, or & if there are query parameters in the URL.

Parameter Name is the name that will be appended to the URL. The may be case sensitive depending on the implementation at the designated URL.

Variable for Value is the variable that will be used to report the value. This will be the value of the variable when the iframe object is created (for example, at the end of a simulation).

Use the button to add a parameter to the list. This will open the Parameters to Append Dialog. Fill this in and the click OK to close it.

To remove a parameter row click on the row and then click on . To edit a parameter row click on it and then click on the Edit button. This will open the Parameters to Append Dialog allowing you to change the contents.

Example

If you have set up a survey with surveymonkey you can ask to pass parameters to that survey using a query string (see https://help.surveymonkey.com/articles/en_US/kb/What-are-custom-variables-and-how-do-I-use-them). Suppose that you have set the variables in that survey to be Use and Time, and the survey has the URL https://www.surveymonkey.com/r/P8WVMHB. Then you would set up the iframe values as:

Where UserID and TimeStamp are model variables. Note that UserID might itself be passed to the published interface as a parameter (see Tracking Users in Data Collection).

The User and Time values will be reported in the Survey Monkey results.