Hi Everyone,

     The problem that Kevin James describes below is one that I've been 
trying desperately to resolve for two weeks now (with the very kind help 
of another list member).

THE SKINNY:

     Using MC's POST command to post to a web-served FileMaker database 
doesn't work in MC 2.4.1B2 but does in 2.3.  In an example similar to 
Kevin's, if you paste the following URL and FileMaker tags into a browser 
address field, you'll get a list of student serial numbers that I used in 
a now defunct class game:

http://rubbersoul.concordia.ca/registration/FMPro?-db=Registration&-lay=Lis
t&-format=reg_admin_search_results.html&-findAll

     However, the button script below, does not work.  

-----Button Script-----------
on mouseUp
  put "http://rubbersoul.concordia.ca/registration/FMPro"; into theURL
  post 
"-db=Registration&-lay=List&-format=reg_admin_search_results.html&-findAll"
 \
      to url theURL
  if the result is not empty
  then
    put the result
  else
    put urlDecode(it) into postText
    put postText into fld "Output"
    if "<HTML>" is in fld "Output" then set the htmlText of fld "Output" 
to fld "Registration"
  end if
  put "I'm done" && the ticks
end mouseUp
-------------End of Button Script--------------

THE FAT

     The script does not complete or goes into an infinite loop.  For Mac 
users, the watch cursor will appear if you open the script editor window 
after clicking the button, and, if you try to close the script editor, 
you'll get an error message saying that you can't set the script while 
it's running.

     It was suggested to me that the "on postHTTP x" handler in libURL 
may be going into an infinite loop when it reaches

     repeat while zStatus[tURL[x]] is empty
          wait for messages
     end repeat

although I'm a novice, so I'd defer to your take on the problem.

     The fix that was suggested to me was to ambush libURL to keep it 
from interfering by placing the following handler in the card script.

     on postURL
          stop using stack "libURL"
     end postURL

     
     That appeared to work for the person helping me out on this problem, 
but unfortunately it hasn't work for me.  When I invoke the 
stop-using-libURL script above, the POST script in my button runs to 
completion, but no data is placed in the Output field that I created for 
the purpose and which, consistent with Kevin's description, implies that 
data is not being placed in the local variable "it".

     As an aside, I should note that I'm running MC 2.4.1B2 on a Mac with 
OS 9.2.  I also tried this on a Mac running MC Carbon, and the problem is 
a little different: the button script does not hang or go into an 
infinite loop, but the local variable "it" is empty.

     I'm terribly stuck at this point.  Anyone interested, can contact me 
off-list, and I'll send them a copy of the very simply stack that has the 
post button.

     Regards,

          Greg






On 12/11/2001 7:00 AM, Kevin James wrote: 

>From: Kevin James <[EMAIL PROTECTED]>
>Subject: Posting w/MC 2.4.1
>Date: Sun, 11 Nov 2001 15:18:10 -0500
>MIME-Version: 1.0
>Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
>I'm having trouble posting with MC 2.4.1.  Specifically, the reply 
>from the server does not get put into the local variable "it" ... the 
>socket remains open and MC hangs.
>
>My particular scenario is posting to a FileMaker database, but the 
>same behavior occurs sometimes ... but not always ... when I post to 
>other cgis.
>
>Data is posted to the server without a problem ... and if you observe 
>things with a session watcher, the server does send a reply to MC ... 
>but MC doesn't seem to be able to discern when the server has 
>finished sending its reply.
>
>Interested?  Have a go at it ... example stack at
>
>http://www.hwbf.org/pub/incoming/post_2_4_1.zip
>
>Webserved view of what I'm posting to:
>
>http://160.129.74.247/FMRes/FMPro?-DB=employees.fp3&-Lay=Summary&-Token=25
>&-Format=TableVw.htm&-Error=Err.htm&-Findall
>
>
>Kevin


____________________________________________________________
Gregory Lypny
Associate Professor
Concordia University
____________________________________________________________
"Better for us if you don't understand."
   - The Tragically Hip


E-mail forum:   [EMAIL PROTECTED]
Visit Pareto at http://rubbersoul.concordia.ca
Visit Borsa at http://rubbersoul.concordia.ca/Borsa_Classroom
Crash site for notes and quizzes at 
http://homepage.mac.com/gregorylypny/FileSharing1.html



Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to