Jump to content

How can I run a Script from the Web???


ITESM

This topic is 8244 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

OK, so I have a script that runs perfectly on FMPro 4, but the deal is, I need to run it from the Web. Specificly, I want to have a button on my web page that performs the script in FM. Is it possible to do this? I've tried to do it by specifying a field button and connecting it through Claris Homepage, but it doesn`t work. How can I do this using Claris Homepage or another way. Thanks!

Link to comment
Share on other sites

***************************************

Yak, scripts on web. OK I am warning you, you will get what you are asking for.

You do not need scripts. I wrote several FM web applications and I do not need single script for any functionality.

If Unlimited is processing requests from Web, you will see all requests on the screen, like from invisible operator.

Now, if you want to work in the same moment with different requests what will happen?

Now, web will trigger script with response time of 30seconds. What you can do with another web request? Or console request?

Single thread is single thread. Queue of requests...

Scripts will be always only partially successful.

Example: to put current date in global field it will work all the time.

To find records by script and display them through HTML -- no way.

It may look it is working. But if first request (1) from user A will run the script, and another request from user B (2) will make different found set of records, then the machine will not display correct set of records to user A (3).

You cannot assume, that FM somehow will process the requests in 1-3-2 sequence.

**************************

What it does

Specifies the FileMaker Pro script that should be performed after the finding and sorting of records (if any) during processing of the action.

Value is

Name of the script to perform.

Syntax example(s)

Perform a script using a link

<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&-Script=Omit+Script&-FindAll">"Run script"</a>

Perform a script using a form action

<form action="FMPro" method="post">

< input type="hidden" name="-DB" value="names.fp5">

< input type="hidden" name="-Format" value="results.htm">

< input type="hidden" name="-Script" value="Omit Script">

< input type="submit" name="-FindAll" value="Run Script">

</form>

Other tags that are required

-DB, any action tag

See also

-Script.PreFind, -Script.PreSort

PS. Dischage the space after <

***************************************

Link to comment
Share on other sites

Anatoli is correct in pointing out that there are problems inherent in running ScriptMaker scripts over the web. Mainly the single-thread engine which processes scripts can not receive multiple requests for a script when a script is already running. The result is that your clients will be misinformed and your data will not have been processed by the script.

Anatoli is also correct in pointing out that a script which runs for 30 seconds will cause problems. But as I like to point out, by combining intelligently written scripts with a successful workaround to the referenced problems, it is possible to run scripts safely over the web.

If you would like to know more about the problem, I recently posted a set of four related threads concerning Entertaining a script, which can be found on the cdml forum. The code is there for you to experiment with.

By the way, I am, as far as I know, the only person who has developed a successful workaround to the problem.

Link to comment
Share on other sites

FMP5.5 web companion is Multi Threaded, does it fix the scripting issue? Kinda, it works MUCH better, but there are still problems to work out. Your best bet: Use Lasso, MultiThreaded to Begin with, and it even has a script functionality that doesn't require you to click on an HREF. You can run a script with the click of a button (as in FMP). Anyhow, try the trial of FMP5.5, see if this works better for you.

Link to comment
Share on other sites

Hudson,

I think multithreaded FM just reached level with Lasso 2 or 3.

Still, the new WC or previous Lasso can do multithreads in way that something is served, something is requested from SINGLE THREAD FileMaker and another request is waiting. Nothing more can be done with single thread FM.

Sorry, still the same problem with scripts.

Link to comment
Share on other sites

As far as I can tell, the problem is not so much with Web Companion as it is with the engine which handles the ScriptMaker scripts. Web Companion is just the messenger. As a messenger WC can handle a near-simultaneous request. The engine running one script can not handle another script request successfully while that script is running.

Link to comment
Share on other sites

This topic is 8244 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.