How to make a simple applescript work as a CGI? seems IMPOSSIBLE!
How to make a simple applescript work as a CGI? seems IMPOSSIBLE!
- Subject: How to make a simple applescript work as a CGI? seems IMPOSSIBLE!
- From: mfmoore <email@hidden>
- Date: Mon, 11 Feb 2002 09:07:20 -0700
I'm just trying to learn how to do this, and I'm beginning to think
this is not actually possible.
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
=====================================================================
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" > *
<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
any help would be appreciated! thank you very much!
m
--
_______________________________________________
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.