An open API service indexing awesome lists of open source software.

https://github.com/trigger-segfault/webscriptdisplay

A small html page for displaying the results of calling a url with parameters.
https://github.com/trigger-segfault/webscriptdisplay

html javascript url

Last synced: 3 months ago
JSON representation

A small html page for displaying the results of calling a url with parameters.

Awesome Lists containing this project

README

        

# WebScriptDisplay

[![Creation Date](https://img.shields.io/badge/created-september%202018-A642FF.svg?style=flat)](https://github.com/trigger-death/WebScriptDisplay/commit/15f71f5b5a77ca161a2fbf511ea8dc6c79b14fcb)

A small html page for displaying the results of calling a url with parameters. This was designed for use with an [OpenVMS](https://en.wikipedia.org/wiki/OpenVMS) server for running small cgi scripts, hence the existing *vms* favicon and sample urls.

***

## Measurements

Adjustable measurements have been documented and listed at the top of `src/css/styles.css` to faciliate customization.

See **Defining a ScriptType: Parameter 5** for adjusting `iframe` heights.

## Changing the Available Script Types

Script types can be modified in `src/js/types.js`. For each page you plan on making, you must create a new array of `ScriptType`s to pass to the `initializeScriptTypes(...);` function inside a `script` tag at the end of the page.

### Defining a ScriptType

Scripts are defined by populating an array with new `ScriptType`s. The parameters for the constructor are as follows:

**Parameter 1:**

The url for the script.

Parameters must be marked with `{P#}` (starts at 1)

**Parameter 2:**

The UNIQUE identifier of the script.

Used to store cookies of last-used parameters.

**Parameter 3:**

The list of parameter names and options.

Leave parameter name as `''` to hide name.

Formats per Parameter:

`'Name'`, Name and no default value

`['Name', 'Default']`, Name and default value

`['Name', ['Op1', 'Op2', 'Op3']]`, Name and dropdown values

**Parameter 4:**

Script label (Appears above input line), leave null to exclude.

**Parameter 5:**

The default height of the `iframe`. (when Parameter 6 is false or fails)

**Parameter 6:**

`true` if the iframe should attempt to resize to the content.
Otherwise `false`.

NOTE: Will ONLY work if the url is on the same domain as this page.

***

## Example Page

![Page Preview](https://i.imgur.com/difNcPb.png)