lumpocole Posted September 26, 2002 Posted September 26, 2002 i would like to recieve data into one record from another web site that is using cgi to submit their forms. at the same time they submit the info to their db, i would like to have the same fields submit (-new or -edit) into a filemaker db. any experience with this? thanks.
Garry Claridge Posted September 26, 2002 Posted September 26, 2002 Are they using Perl for the cgi programs? Garry
Jeff Spall Posted September 27, 2002 Posted September 27, 2002 Hi, this would be easy the other way around - could you have their site call a Filemaker form page on your server to submit the data that could call the cgi from a results page through an inline or javascript? I think this would be much simpler to do than to modify a cgi script. regards, Jeff
lumpocole Posted September 27, 2002 Author Posted September 27, 2002 "call the cgi from a results page through an inline or javascript?" could you elaborate a bit more on this bit? i think this might be the best way to go... thanks.
simon1663 Posted September 27, 2002 Posted September 27, 2002 You can do it 3 ways. 1. Use javascript for the form submission. You can code the javascript two custom build the submission url and then launch another window to submit to your database - whereas the native window submits to pearl. This is not hard to do. At least for a javascript experienced person this is just peice of cake. 2. From what I know - like php pearl can open http connections to a foreign sever. In that way, the foreign server can be customized to create a socket connection to your fm server and upload/edit the data. In php it is like readfile('http://yourfmserver/FMPRO?-db=whatever&....&-new') 3. After the data has been submitted to cgi - on the return document after submission - custom build a meta tag to forward the data to your fm server I guess your aim is to update 2 place at one go. With straight HTML it is not possible(I believe). Because even if you can specify form.target attribute - it only be one value. Unless again you want use javascript to dynamically change it. Hope it gives you some ideas
Jeff Spall Posted September 27, 2002 Posted September 27, 2002 Hi, at it's simplest if you create or amend the record into Filemaker, you could embed the info into the reply format page and invoke the cgi either "onload" or through an inline form action. I guess you could make it look like a feature by making the page a 'thanks for submitting' message. I think that if you start by submitting through the cgi, you'd have to rework the script to post a form action direct into filemaker. Could be done, but much harder
Jeff Spall Posted September 27, 2002 Posted September 27, 2002 Just a thought. can the original form post two actions with javascript, kinda like this: <HTML> <HEAD> <TITLE>Submit to 2</TITLE><script language="javascript"> function submitIt(theform){ first(theform); second(theform); function first(form1){ form1.submit(); } function second(form2){ ExtendedSubmit = "http://www.mycompany.com/cgi-bin/thecgi"; document.help.action = ExtendedSubmit; form2.submit(); } } </script> </HEAD> <BODY> <form name="help" action="http://www.myothercompany.com/FMProstuff" method="POST"><BR> <input type="Text" name="name"><BR> <input type="button" value="Test" onClick="submitIt(this.form)"><BR> </form></P> </BODY> </HTML> .......er, there's folk on this forum who can offer much better Javascript than me, though regards, jeff
Recommended Posts
This topic is 8194 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