Re: Web Help
- From: "Bill Marriott" <wjm@xxxxxxx>
- Date: Sat, 8 Jul 2006 10:36:07 -0400
Jesse,
Most commercial web servers have a scripting language built into them called
PHP. If you're running your own Mac or Windows server, you can install PHP
on your own.
Here's a really simple example:
You have a form that needs to be printed and signed, pre-filled with
someone's name and employee number. Your FileMaker Pro file has the fields
"EmployeeName" and "EmployeeID" in it.
1) Create a calculation field:
PrintUrl (calculation, text result)
= Let(
myLink = "http://www.myserver.com/certificate.php?";
myLink & "employeename=" & EmployeeName &
"&employeeid=" & EmployeeID
)
This creates a result that looks like
http://www.myserver.com/certificate.php?employeename=Bob&employeeid=1234
2) Create a FileMaker button, Go To URL [PrintURL]
3) Create the HTML page with the form you need printed out:
<html><head></head><body>
<table border=1>
<tr>
<td><b><? echo $employeename ?></b></td>
<td><i><? echo $employeeid ?></i></td>
</tr>
<tr>
<td colspan="2">
<h1>The rest of your form goes here</h1>
</td>
</tr>
</table>
</body></html>
And save it as "certificate.php" on your web server.
Now, if you click the button on your FileMaker database you'll see a web
page pop up with a very simply-formatted form. You could adjust the HTML to
suit your needs.
How it works:
The part "?employeename=Bob&employeeid=1234" is a "URL parameter list" and
it is basically information that is passed along to a web server when you
request a page. The list begins with a "?" and has a series of <name> =
<value> pairs separated by "&" following.
Within the HTML page the "<?" and "?>" mark the presence of embedded PHP
commands.
The "echo $employeename" and "echo $employeeid" bits are PHP commands which
tell the web server to print out the contents of the script parameters of
the same name.
Now this is obviously very simple but I hope it illustrates the process. You
can employ this technique for much more sophisticated reports, even
multi-line ones showing several records, with additional effort.
You might also look into XML/XSLT.
----- Original Message -----
From: "Jessie"
To: "Bill Marriott" <wjm@xxxxxxx>
Sent: Thursday, July 06, 2006 9:36 AM
Subject: Re: Web Help
Thanks Bill"Bill Marriott" <wjm@xxxxxxx> wrote in message
Can you elaborate on your second option, i.e. "pass parameters to a
simple php-based html page" My web inexperience is showing through!
I will give the first suggestion a try.
Jessie
news:ccKdnXv8t7digjHZnZ2dnUVZ_umdnZ2d@xxxxxxxxxxxxxx
Jessie,
Yeah that is a big limitation in the IWP interface right now...
You cannot trigger scripts "on the host" via IWP. However, what you *can*
do to get around the limitations with IWP reports is to build your own.
Two methods:
1) Calculated text field.
2) HTML/PHP, and the "Go to URL" script step.
The two approaches are really similar, differing only in the selected
output method. In both cases, you would use a script that runs through the
records contained in the report and builds an internal representation of
the report output -- including any totals or subtotals -- using variables.
With method 1, you construct it with a mind to output via a text field.
With method 2, you would pass parameters to a simple php-based html page.
"Jessie" <johnfielding@xxxxxxxxxxxx> wrote in message
news:1152112522.578219.71190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am using FMP8 and would like some assistance with some WEB issues.
1) Does anybody know a trick to trigger a script on host machine from
the web? Printing from the web is not the best as you can not compress
blank lines. I have a print to PDF script in the database that would
dump a file to a shared folder so that the web user could just go and
pick it up.
2) On that same subject, an even better solution would be clean
printing from the web. I have reports that can range from 1 to 5 pages
long depending on the content. In FM you can nicely compress the output
so if there is just one page, it prints only one page. While connected
to the file via the web, I get all 5 pages regardless of content. I am
also not able to supress the show/hide status arrow from printing. On
some browsers, unless you go into the printing prefs and set to print
active pannels, you end up with a dogs breakfast!
Any help is greatly appreciated.
.
- References:
- Web Help
- From: Jessie
- Re: Web Help
- From: Bill Marriott
- Web Help
- Prev by Date: How can I scan an ENTRY FORM into FILEMAKER
- Next by Date: Re: How can I scan an ENTRY FORM into FILEMAKER
- Previous by thread: Re: Web Help
- Next by thread: Re: Hyperlink
- Index(es):