Thanks Brad - You were so helpful.

The only thing that it didn't like was _request. When I changed it to _form it worked. I also removed the Method tags.

Lisa

On Jun 1, 2007, at 3:29 PM, Brad Perkins wrote:

External.a4d needs to be an Active4D page.

If you end up calling reusable Active4D code from this page then you might want to put that code in a library.
You can also write individual methods inside a page if you want.

Therefore you would have a file named external.a4d in your root 'web' folder.

That file would look something like this. Note I'm just typing this in so syntax is probably off.
<%
   /*
      file : external.a4d
      purpose: allows remote system to query my 4D database
           usage : /external.a4d?qtype=foo&qval=bar
      This will perform the foo query with input 'bar'
   */

   ` if you had code in a library you would do this to import it
   import ("myLib");

   ` an example of an inline method
   `This method will be accessible to the rest of this page
   method "sayHello"
       write("Hello World")
   end method

   ` your input params
   $queryname := _request{"qtype"}
   $queryvalue := _request{"qval"}

   $vt_Output := ""; `will be set in query

   if ($queryname != ""  && $queryval != "")
      ` do stuff
   end if

   write ($vt_Output) `if you want to send this back to the requester

----------------------------
Lisa Werdal
Taylor Technology
609-951-0005 x405
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to