SPIS Webview

Optional Features

Logo

Webview includes several optional features of particular interest to those using it for offline demonstrations, training, web site simulation and data gathering. The evaluation version of Webview has all the optional features active so you can try them out. However, you must specifically order each option if you want it to be usable in the registered version.

The optional features are:

Return to the Table of Contents...

-----------------------------------------------

Built-In Text Editor

Webview will let you examine and edit the HTML text of the current page. Just press F9 or click the View button near the top right of the form. In text editing mode, you can:

Any unsaved changes you make in the text editor will be preserved until you exit Webview, or until you try to edit a different page using F9 or View. You will always be given a chance to save changes before they are discarded.

Note: the maximum page size that the Webview text editor can handle is 32 kilobytes.

Return to the Webview Options...

-----------------------------------------------

Scripted Demonstrations

This option allows you to set up a demonstration of your web pages which will run automatically as soon as Webview starts. It's very useful for shows or other occasions where you want the whole site to be viewed without user involvement. You can choose to let the user intervene by hiding or showing the Pause button, or even running the demonstration in Single Step mode if you like.

Aspects of the display such as the page scrolling and loading rates can be independently controlled. Best of all, you don't need to alter your HTML to make the scripts work!

The best way to learn about scripts is to try one out. Copy the following lines and add them to the end of your Webview.ini file (it's in the same directory as Webview.exe). Then exit Webview, run it again and watch the results. Note the pause/play button at the top right of the form -- use this to stop and restart the script any time you like.

When using scripts with frames, you can specify which frame will scroll in the following way
6=wvframe.htm,framename ; this will scroll the frame called "framename"
if you want to then scroll a second frame, you can do this by not specifying a page, just a frame name, e.g.
7=,vmenu ; this starts another frame scrolling
In all cases, the active frame will be the one scrolling. If you select another frame manually with the mouse, then that frame will scroll.
It is possible to specify which Frame will load the next file by using
8=framename<filename.htm
If no framename is specified then it will load the page as full screen.

; Here is a simple script example -- to stop it running automatically whenever
; you load Webview, just put a semicolon in front of the next line:
Script=Sample    ; Which script to run (can define several in the INI file, and use any one)
Page Rate=1      ; milliseconds, i.e. no gap *between* pages
Page Load Delay=2000 ; i.e. wait 2 seconds after load before starting scroll
Scroll Rate=3000 ; millisecs, i.e. 3 seconds between scrolls -- 0 means NO scrolling
Scroll Amount=90 ; % of vertical height of the display area to scroll each step
Pause Button=Yes ; If no, user can't pause the script
Single Step=No   ; If yes, awaits F10 or "play" after each page loads

; Here is the "Sample" script referred to above.
[Sample]
1=alarmrng.wav               ;start a background .wav file
2=webview.htm#Registration      ; Show from the Registration section of Webview.htm onwards
3=SingleStepOn               ; from now on, it is as if SingleStep above had been set to yes
4=webwatch.htm               ; load the page, and then stop (because of SingleStepOn)
5=SingleStepOff              ; back to continuous play
6=wvoptions.htm              ; then show the options page, 
; Frames demo section
7=wvframe.htm,main            ; load the index Frameset, and scroll the frame called "main"
8=main<wvoptions.htm,vmenu ; load wvoptions.htm into the "main" frame and scroll the "vmenu" frame
9=Stop                       ; don't start the script again unless F10 or Play is pressed.

The SingleStepOn setting in the [Setups] section can be overridden in the script as above.

Once you've tried that, change to the following display settings. They should give you smooth, continuous scrolling, with a pause at the end of each page:

Page Rate=3000   ; 3 second pause at the end of a page
Scroll Rate=100  ; 1/10 second pause between scrolls
Scroll Amount=1  ; scroll by 1% of the display area each time

You may also want to experiment by setting Single Step=Yes.

Finally, a few notes on developing scripts using Webview:

Return to the Webview Options...

-----------------------------------------------

Page Compression -- Speed, Size, Security

All copies of Webview are able to decode and display pages and other files stored in compressed archives. The process works as follows:

Depending on the content of your pages, the amount of space saved will range from 20-50%. GIF and JPG images will hardly compress at all, but HTML, EXE, BMP or WAV files will be significantly compressed. This makes distribution of floppy-based material even easier!

To see a working example of a compressed page archive, make sure you download the full evaluation version, then run any of the pages in the Special Features section.

Self extracting compressed archive

From Webview 3.1 onwards, the Page Compression option includes MAKEEXE, which not only compresses the pages, but also the Webview program files. The whole package can be delivered as one executable file, which will unpack itself and display the "start" page listed in your INI file. When the user exits Webview, it will delete all the extracted files and clean up. The process works as follows:

The Self-extracting file will pass on any parameters it is given to the Webview program, so for instance you could run Myarchive.exe other.htm to self-extract and start Webview displaying the other.htm page rather than the "start" page one listed in the INI file.

MAKEEXE is supplied as part of the MAKEWV package, and is included in its price.

Return to the Webview Options...

-----------------------------------------------

Local CGI

With online web sites, you can write Web applications which process form input and produce result pages which are then sent back to the browser. This is usually done using "Common Gateway Interface" (CGI) calls. Local CGI gives Webview the same capability, except that the crafting of Local CGI applications is usually much easier than the online variety!

You can write your applications in Visual Basic, Borland Delphi, C++ or any programming language which creates executable files.

Just as with regular CGI, a Local CGI call is defined using the <FORM> tag's Method and Action attributes, e.g.

        <FORM Method="WVRUN" Action="search.exe srchvals.txt results.htm">

The above statement tells Webview that when a button on the form is pressed, it should:

In order to maintain "neutral" behaviour for existing forms you may display, Webview has defined four new Method values:

Where files are located when using Local CGI

EXE files referenced in Action statements (and also in direct HREF links) are assumed to be:

  1. in the specified path if an absolute path is given
  2. in or relative to the current web page's directory, if present
  3. otherwise assumed to be on the system path

Form data and result page files referenced in Action statements are located as follows

  1. in the specified path if an absolute path is given
  2. if "CDROM=Yes" is in the [Setups] section of Webview.ini, in the system's TEMP (if defined) or Windows directory
  3. otherwise in or relative to the current web page's directory

Regardless of where the files end up, the correct path is always passed to the program, so it simply needs to use the path(s) which Webview will specify in the parameter list, e.g.
myapp.exe c:\temp\formdata.txt c:\temp\output.htm

Now you know how to call your Local CGI program, you simply need to write the code to process the form data file (test-drive our Order form in the evaluation version to see an example of one such file). Then, if necessary, have the program generate an HTML response page. Have fun!

Return to the Webview Options...

-----------------------------------------------

Search your HTML pages for text

From Webview 3.0 onwards, Webview has the ability to search all the HTML pages in an archive, or downwards from the Root Directory specified in the INI file, for a specific text substring. The search is not case sensitive, and will pick up partial words on any page.

A customizable search results page is specified in the INI file, and the user can return to this page at any time by pressing the Search button which appears on the toolbar.

Return to the Webview Options...

-----------------------------------------------

SPIS home page SPIS WebWatch SPIS WebView HREF WebHub TCompress for Delphi All contents © Copyright SPIS Ltd 1996