Re: Applescript CGI Counter - Another Option
Re: Applescript CGI Counter - Another Option
- Subject: Re: Applescript CGI Counter - Another Option
- From: vectormation <email@hidden>
- Date: Sun, 15 Apr 2001 20:12:33 -0400
Not (yet) AppleScript related - but definitely easier than reinventing
the wheel : Modular Gateway Interface - aka "MGI"
Try out the free, fully functional demo at :
http://www.pageplanetsoftware.com/mgi.html
It's a tag-based, in-the-html style programming language for adding
counters,
tokens, ecommerce, databases, and whatever else you can dream up to your
website... It was originally developed on Macs, recently made
cross-platform
(Mac + win32) with the primary development still occurring on Macs.
I work for an associated company.
~Phi
>
On Saturday, April 14, 2001, at 11:22 AM, Michelle Steiner wrote with
>
justifiable frustration:
>
>
> I've seen methods where there's a simple line in the HTML code (like
>
> what
>
> Ted Wood showed in his reply) that merely inserts text into the a line,
>
> without having to assemble the page in parts; that's all that I'm trying
>
> to do.
>
>
>
> I can't believe that it has to be as complex as some of the responses
>
> I've been getting make it out to be.
>
>
Ok, here are the simple options:
>
>
1) Server Side Include (SSI) - Personal Web Sharing does not support
>
this; WebSTAR does. With WebSTAR the syntax (placed within the HTML) is
>
very simple:
>
>
<!-- #counter var="counterVariableName" display="true" -->
>
>
BUT (and it's a big but), it works only with static pages, NOT pages
>
generated by a CGI.
>
>
2) Applescript CGI (because this is the Applescript list, therefore
>
there is no other way to write a CGI : )
>
a) Use a property in the script which is incremented by the CGI
>
each time it runs, and which is included in the returned HTML.
>
Cons: if you recompile your script the counter is reset. Of course,
>
you can reset it to the last value it showed.
>
>
b) Have the CGI read the counter value from a text file, increment
>
it, and write it back. Display the value in the HTML your CGI returns,
>
Cons: None, really. You just need to know how to write a CGI. Since
>
you are new to CGIs, I'll give specifics in a separate (on list) email
>
(or I should finally make the instructional web page I've been meaning
>
to).
>
>
CGI in a nutshell - click the submit button on a web page with a form,
>
and the browser passes the form data to the server, which in turn passes
>
the form data to a program called a CGI. The CGI processes the data and
>
returns a complete HTTP response (HTTP headers + HTML) to the server,
>
which passes this reponse to the browser, which displays the HTML just
>
as if it was a static page.
>
>
Jeff Baumann
>
email@hidden/email@hidden (dual citizenship!)
>
www.linkedresources.com
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users