• 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: PHP and Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PHP and Applescript


  • Subject: Re: PHP and Applescript
  • From: Brian Johnson <email@hidden>
  • Date: Sun, 10 Feb 2008 10:06:18 -0800 (PST)



On Sun, 10 Feb 2008, Grace Finn wrote:

On Feb 10, 2008, at 11:15 AM, has wrote:

Your webpage shouldn't link directly to the ACGI script;

That's not 100% true. The ACGI script acts as a resource on the web. It *must* return some HTML to the browser, but it can be accessed as a simple link <a href="my.acgi">. Not common, but possible (especially if you pass search arguments, like this <a href="my.acgi?forward">).


it should submit a POST request from a web form to the web server (in this case, Apache + ACGI Dispatcher) which then calls the ACGI script's 'handle CGI request' handler, passing it the form data to process

This is the common usage, because it lets the user provide variable input data to which the acgi may respond. In your case, you want the input data to be robot commands.


I have used in the web page the following:
<FORM METHOD="POST" ACTION="cgi-bin/right.acgi">
<BR>
<CENTER>
<INPUT TYPE=submit VALUE="RIght">
</CENTER>
</FORM>

and returning its result as a new web page when done.
This is the part where I have the problem. I don't need to return a result

but the web is like ping-pong. You hit the ball over the net with your form, the acgi *must* hit it back with result data or the browser times out (sound familiar?).


to the user - I only want the applescript to activate the robot controller and the user web page (in whatever type of browser they are in) to refresh so the network camera video will be refreshed. Is creating the HTML in the applescript the only option in this case?

You can return an http redirect, or a simple HTML page with a javascript redirect, and use that to load a static HTML page with the form for the next event. As long as the form is always the same, that should work fine.


Are you using a collection of separate CGIs? (your use of the "right.acgi" in your form suggests you might have a separate acgi for each action) or running all the commands through one?

  -b.johnson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: PHP and Applescript
      • From: Grace Finn <email@hidden>
References: 
 >Re: PHP and Applescript (From: "Gary (Lists)" <email@hidden>)
 >Re: PHP and Applescript (From: Grace Finn <email@hidden>)
 >Re: PHP and Applescript (From: Brian Johnson <email@hidden>)
 >Re: PHP and Applescript (From: has <email@hidden>)
 >Re: PHP and Applescript (From: Grace Finn <email@hidden>)
 >Re: PHP and Applescript (From: has <email@hidden>)
 >Re: PHP and Applescript (From: Grace Finn <email@hidden>)

  • Prev by Date: Re: Error -609
  • Next by Date: Re: PHP and Applescript
  • Previous by thread: Re: PHP and Applescript
  • Next by thread: Re: PHP and Applescript
  • Index(es):
    • Date
    • Thread