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.
- Host: GitHub
- URL: https://github.com/trigger-segfault/webscriptdisplay
- Owner: trigger-segfault
- Created: 2018-09-17T16:47:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-17T17:31:39.000Z (almost 7 years ago)
- Last Synced: 2025-01-29T03:37:13.617Z (5 months ago)
- Topics: html, javascript, url
- Language: JavaScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# WebScriptDisplay
[](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
