filsa.net: Frontier / Scripts / Weird Macros / htmlPopText Suite
This is part of Phil's Script Archive

htmlPopText Suite

Cheap, easy, low-bandwidth, interactive FUN for your webpages


This fat web page contains the htmlPopText table object.

Use the 'Get Page Data' command from the Scripts menu to copy htmlPopText into your object database.

Also available: info about fat pages and the Terms under which you can use this script.

"Webmonkey" had a little tutorial ("June Cohen on forms") a while ago on using forms as design elements on your webpage (find the article via the subject index). June likes the popup menus the best, and I have to agree, they are the most fun. But fun doesn't always cut it with your boss, nor with mine. I had to wait for a good reason to mess with this stuff. Finally, a project arose where I'd get to use these cute little menus.

Now, it is possible to go overboard on this, but I can see how a creative webmaster would use these to spice up a page. Quotes, definitions, tip of the day; there are all kinds of creative uses for these things. Give it a whirl.

Okay, enough PR, now answer some questions

The form is purely decorative, but provides helpful and immediate feedback.

The grinder script grinds your text up into the popup menu. It has these parameters:

grinder (string, title="", linelength=40, divider=true, dividerchar='_', indentlength=0)

string is the main text of the poup menu. Required.

title, if defined, is the first line of the popup menu. It will be visible before anyone clicks on the menu. Optional.

linelength is the length of wrapping. Defaults to 40.

divider
dividerchar: These two parameters are only used if a title is defined. If divider = true (the default), then a separating line is drawn between the title and the main text. dividerchar isthe character to be used for the line.

indentlength is there because eudora.ucmds.massagetext uses it, and that's what I used for the word wrapping. If you want your text to be indented, you can change this setting.

htmlPopText in action

Well, I can tell you are wondering if there is any point to this suite.

Heck yes.

It's fun, has a variety of uses,-- you could even hook it up to a CGI. It's easy to use, painless to operate, and opinion-free. You don't have to agree with me or

on this or anything else; you can just use this suite any old way you want.

Of course, it'd be better if you agreed with me.

using htmlPopText

The scripts in this suite are all designed to be used as macros in HTML pages. Call them from inside braces. For example, {htmlPoptext.randomQuote ()}.

The main script is the grinder ().

Other scripts include:

randomQuote (). Returns a random quote from a sizable collection in the data table.

randomTip (). Only works with tipCenter 1.0b6 or above. Returns a random Tip Center tip.

tip (). returns a tip from the outline in the data table. This outline is actually the very first incarnation of "Tip Center".

View the Source:


© copyright 1997-98 by Philip Suh. Comments are appreciated.
This page last updated on 5/15/98; 9:17:51 AM.
<http://www.filsa.net/frontier/scripts/WeirdMacros/htmlPopText.html>
filsa.net: Frontier / Scripts / Weird Macros / htmlPopText Suite