Newbies Amadda Posted July 30, 2003 Newbies Posted July 30, 2003 Hi, I'd like to share reports with users through my web interface. Ideally, I would be able to have them trigger a script which allows them to download a .tab file exported from FMP. I've heard of the problems with using FM scripts on the web, and I was going to risk it but I haven't been able to get the report to download to the user's computer anyway. Anybody have any brilliant ideas regarding how I could get data to my users through the web? Thanks, Amy
Steve T. Posted July 30, 2003 Posted July 30, 2003 Hi, Amadda! My guess is that the export will only export to the FM server you are running. Maybe you could have the script perform the export as a separate file to a public-ly accessible location on the server (Web folder?) and then you can have a link to that file on your web page that they could then download using their web browser. --ST
Jeff Spall Posted July 31, 2003 Posted July 31, 2003 Hi, though I've always come down on the side of "no script" on the web I gotta confess to using one to do just this - I have a database with an "export these records" button, which runs a find-and-export script and a "get the records" button which runs a simple Javascript that opens a window of the directory that the records are exported to. in the page header: <HEAD><script language="JavaScript"><!-- function openAWindow( pageToLoad, winName, width, height, center) { xposition=0; yposition=0; if ((parseInt(navigator.appVersion) >= 4 ) && (center)){ xposition = (screen.width - width) / 2; yposition = (screen.height - height) / 2; } args = "width=" + width + "," + "height=" + height + "," + "location=0," + "menubar=0," + "resizable=1," + "scrollbars=1," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "screenx=" + xposition + "," //NN Only + "screeny=" + yposition + "," //NN Only + "left=" + xposition + "," //IE Only + "top=" + yposition; //IE Only window.open( pageToLoad,winName,args ); } // --></script> </HEAD> ------------ on the page: <A HREF="javascript:openAWindow('http://www.mydomain.com/thepath/thefolder','win1',350,275,0)">get the files</A> ---------------- this is a really easy way to do it. If you had to send it to the user's computer, I guess you could have the export folder watched as a hot folder and run a script. On a Mac, it's an easy Applescript: -------------------------- on adding folder items to thisFolder after receiving fileList set ftpURL to "ftp://100.100.100.100/uploads/" repeat with i in fileList tell application "Finder" to set thisFileType to the file type of i try tell application "URL Access Scripting" activate upload i to ftpURL replacing yes end tell on error errMsg number errNum display dialog (errNum as string) & ": " & errMsg end try end repeat tell application "URL Access Scripting" to quit end adding folder items to ---------------------------------- and I'm sure folk could suggest one for Windows, too. As these uploads would be independent of FileMaker they wouldn't count as "scripts on the web" regards, jeff
Newbies Amadda Posted August 4, 2003 Author Newbies Posted August 4, 2003 Thanks, guys. I'll give this a try!
Recommended Posts
This topic is 7774 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 accountSign in
Already have an account? Sign in here.
Sign In Now