A Rev Web Project and On-Rev working together?
sarah.reichelt at gmail.com
Wed Dec 16 15:45:04 CST 2009
> I have a little rev project that I will eventually turn into a
> webRevProject. I would like to have this little webRevProject project store
> a line of text into an on-rev text file. I'm not quite getting it right...
> Here are the three parts that I have:
> 1. Rev Projects Script
> put theSentence & " -created in " & totalTime & " seconds" into theSentence
> set the clipboardData["text"] to theSentence
> put "sentence" & "=" & urlEncode(theSentence) into tMyPostData
> post tMyPostData to URL "http://jpatten.on-rev.com/xmas/saveSentence.irev"
> 2. SaveSentence.irev
> put $_POST["sentence"] & return after URL: "file:sentence.txt"
> 3. sentence.txt (a blank text file waiting to be written to)
Basically, this should work fine, but there are a couple of things
which may be typos in your email, or may be causing problems.
In Step 1, you post to saveSentence.irev, but in step 2, you say the
irev file is called SaveSentence.irev. Servers are usually
case-sensitive, so you need to make these 2 consistent.
In step 2, you have:
.... URL: "file:sentence.txt"
but the colon after URL is not correct.
For testing purposes, check "it" and "the result" after the "post"
command to see if there is any error or returned value.
In your irev file, have it write a log file showing all the $_POST
variables to check what is arriving.
More information about the use-livecode