• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to make a simple applescript work as a CGI? seems > IMPOSSIBLE!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to make a simple applescript work as a CGI? seems > IMPOSSIBLE!


  • Subject: Re: How to make a simple applescript work as a CGI? seems > IMPOSSIBLE!
  • From: JJ <email@hidden>
  • Date: Mon, 11 Feb 2002 22:40:59 +0100

> I'm just trying to learn how to do this, and I'm beginning to think
> this is not actually possible.

Seems there was some problem with AS cgi's in version 1.6

> I have a very simple script that I save as "Test.acgi" , as a "Stay
> Open" ,"Never Show Startup Screen", classic applet. It is as follows:
> =====================================================================
> on handle CGI request myURL
> set mystring to "<html><head><body>" & dostuff(myURL) & ,
> "</body></head></html>"
> return mystring
> end handle CGI request
>
> on dostuff(astring)
> return "It REALLY worked!"
> end dostuff
> =====================================================================

A "acgi" is an asynchronous cgi (so, auto-quit if not working). Really you
applet is a simple cgi.

> I've saved that file and the following in the exact same folder, my
> "Documents:Webpages" folder.
>
> and then I have a very simple html page that looks like this:
> =====================================================================
> <html>
> <body>
> <form method="post" action="http://99.99.99.99/test.acgi"; > *

It should work with >> action="test.acgi"
because it's stored at the same level as your page

> <input type= text name="name" >
> <input type=submit>
> </body>
> </html>
> =====================================================================
> (* for 99.99.99.99 see below)
>
>
> and the idea is I can type in some text into the text box, click the
> Submit button, and a second page will pop up, saying nothing more
> than "It REALLY worked!" ...
>
> but... it DOESN'T!
>
> I went to the web sharing control panel, and I turned it ON,
> identifying "Documents:Webpages" as the folder to share, and
> Test.html as the homepage. Once I get an IP address, I replace the
> 99.99.99.99 above with the number given to me. I've tried this with
> file sharing (read/write for everybody) or without (read only for
> everybody). no difference.
>
> I open up Opera 5.0, or Netscape 4.75, and type in
> http://99.99.99.99, and I see my goofy little page - wonderful.
> until I click the Submit button - I see the url pop into place:
> http://99.99.99.99/test.acgi , and then it just goes into
> neverneverland, finally coming back complaining
>
> "A CGI or internal server component could not complete the requested action."
>
> I've tried using "POST", and "GET", but nothing seems to result in
> any action at all.
>
>
> other details:
>
> mac b&w g3, os 9.1
> 384 mb RAM
> apple script 1.6

Your code should work.
Many applescripters counsel downgrade to AS 1.5.5 or upgrade to 1.7

Bye!

JJ
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: shell script with top "can't get terminal attributes"?
  • Next by Date: Re: Disappearing OSAX
  • Previous by thread: Re: Since Apple Listens to this List... [Case Statements]
  • Next by thread: Copying folders, and files
  • Index(es):
    • Date
    • Thread