WebPage.cgi
is a web-based (cgi) program you can use to send pages to Kentec/PageWest
customer pagers. Using standard html form tags in a web page you can
create a form to fill out a message to send to your pager.
What is WebPage.cgi about?
To use WebPage.cgi, it'd help to have a bit of familiarity with HTML
(Hyper Text Markup Language), the formatting language web browsers
know how to read. Here
is a good place to learn (or if you don't enable javascript, try this
Yahoo page
on the topic), and
here is a good reference html place.
But even if you have no clue on using html, if you can figure out how to
stuff a few html tags into your web page, it'll be pretty easy to use WebPage.
Here's an example of the most basic setup (though it's probably all that most
people will ever need). Stick this somewhere in the body of your web page:
And here's what that would actually look like in your web browser:
Send a message to my pager!
Basic Example
Send a message to my pager! <br>
<form method="POST" action="http://www.pagewest.net/cgi-bin/WebPage.cgi">
<input type="hidden" name="function" value="send_page">
<input type="hidden" name="pagerid" value="5551234">
<textarea name="message" rows=5 cols=48></textarea> <br>
<input type="submit" value="Send Page">
</form>
WebPage.cgi is of course a cgi program, and like all cgi programs, it's input
comes primarily from form elements on a web page. There are different types of
form elements, which basically give you different interaction with the user of
your web page on how to get the input you want, but all that's really important
is that certain elements are assigned the right "name" attribute, and
I suppose that the corresponding "value" is correct/usable/etc. If
none of this makes sense, you should go read up on HTML, or use the examples
above to get you by.
Of course you need to start the form off with a <form> tag pointing to
the URL of WebPage.cgi, and probably a method attribute, like so:
<form method="POST" action="http://www.pagewest.net/cgi-bin/WebPage.cgi">
There are 3 required elements:
Ok, so why even have the "function" element if it can only have one
value? Simple - it's used by "reentrant" calls to the cgi program
to tell it what function it's performing. (ie. the program uses it) Probably
setting this in a type "hidden" input tag is easiest.
The "pagerid" will normally be set to your pager number, because it's
your web page people are visiting, and your pager you want their message to go
to. Another hidden input tag works well here, too, unless you're doing something
like the Multiple Pagers example above.
There are 2 more tags that provide info to control the behavior of WebPage.cgi:
The name field will be added to the beginning of the page as "From Joe Blow: "
if "Joe Blow" is entered. Generally a text input field is appropriate, though
you can be creative with it (eg. use javascript to stuff in the user's email address
automatically). Don't use this element for numeric pagers.
"limit" is the number of characters allowed to be sent to your pager.
There is an upper limit of 250, but many alphanumeric pagers only hold 130, so you
may want to use this. (Another way to limit the size is with a text input element,
setting the "maxlength" attribute to the size of message allowed.)
Note: if you use the "name" element (immediately above), the value
entered there + 7 is included as part of the message and it's allowed length. Eg.
"From John: " would take up 11 characters out of the limit you specify.
If you've tried any of the examples above, you'll see that the WebPage.cgi
program spits out a pretty generic looking result screen, telling you that
either the page was sent, or it gives you an error explaining why it was
not. That's certainly functional, and probably enough for most people/cases,
however if you want a "prettier" display screen that looks somewhat
like your web page, there are a few form elements you can use to do so.
Example: Here's a form that will submit an incomplete request to
WebPage.cgi, and hence produce an error message.
And Here's a form that will generate the same error, but follows the
"theme" of this web page:
And here's the html used for that form:
This probably won't be used much, but if you wish to redirect a user to
another URL once they submitt the form (ie. send you a page), you can use
this element. Make sure the value is a full URL, and not a relative pathname,
as browsers tend to choke when they see a
<input type="hidden" name="redir" value="http://www.somewhere.com/foo/">
You probably won't need this unless you're using funky characters in your form
attributes and they're not turning out right and you choose to be lazy in figuring
out what they're turning into.
HTML Form Element Names/Meanings
Required Elements
Additional Input
Homepage Theme Intigration
<form method="POST" action="http://www.pagewest.net/cgi-bin/WebPage.cgi">
<input type="hidden" name="function" value="send_page">
<input type="hidden" name="bgcolor" value="#ffffff">
<input type="hidden" name="background" value="http://www.kci.net/~jesse/bg.jpg">
<input type="hidden" name="text" value="#034059">
<input type="hidden" name="link" value="#040769">
<input type="hidden" name="vlink" value="#ee8e05">
<input type="hidden" name="alink" value="#9a5c03">
<input type="submit" value="Click Here for Error Message">
</form>
Redirection
Location: header and
what follows isn't a URL. Eg:
Debug
Things should be fairly straight-forward for using this. Pretty much you just
need to figure out how to stuff a little html code into your web page (which
probably depends on what program you use to create your page), then just copy
and paste some of the examples above and make the changes you need/want (hint:
changing the "pagerid" field to your pager number helps quite a lot).
Most of the forms on this page are fully functional, and you can see another
working example at PageWest's WebSite.
If you're really stuck and need a hand, try emailing our webmaster(s)
(webmaster@kci.net), they're pretty good with this stuff.
Help