Professional Web Applications Themes

ASP files on FMpro web companion - FileMaker

Is it possible to use ASP files with FMPro web server? if so any links for details? thanks james...

Sponsored Links
  1. #1

    Default ASP files on FMpro web companion

    Is it possible to use ASP files with FMPro web server?

    if so any links for details?

    thanks james



    Sponsored Links
    ROKKSTAR Guest

  2. #2

    Default Re: ASP files on FMpro web companion


    If I understand correctly, you want to make data in FileMaker available
    to ASP scripts (perhaps for publishing on the web, or manipulating the
    filesystem, or interacting with another application using ASP as a
    middle ground).



    ASP cannot interact directly with FileMaker Server - it can, however,
    interact with FileMaker Web Companion. FileMaker Server would house the
    solution, then you'd have FileMaker Pro (client) connect to the
    FileMaker Server, and then you'd enable the Web Companion plug-in on the
    FileMaker client, making the FileMaker client an HTTP responder. I
    mention using FileMaker client, which will work, but FileMaker's
    licensing agreement requires you to use FileMaker Unlimited when
    connecting to Web Companion with third party software (such as ASP or
    PHP or Lasso).



    Web Companion accepts HTTP requests using FileMaker's cgi specs. A
    standard request might be:[url]http://server.com/FMPro?-db=mydb.fp5&-lay=my_web&-format=&-[/url]
    fmp_xml&my_field=my_value&-findThis tells the Web Companion to
    perform a find in mydb.fp5 for records where my_field = my_value. It
    also tells FileMaker to respond with the fields that are on the "my_web"
    layout, and to format the results using the "fmp_xml" xml grammar.
    (Alternatively you could specify a CDML page to format the output).
    Also, in the example I told FileMaker to "find" - but there are other
    commands you can use such as "new", "delete", "findall", etc.



    So - you send the web companion directions using HTTP and receive an XML
    doent in return. That's the basic idea of getting ASP and FileMaker
    to interact.



    More specifically, to send HTTP requests and obtain the XML result in ASP (JScript or VBScript or whatever you're using) you'll need to use the MSXML object provided by MDAC (microsoft data access components). I believe MDAC is installed automatically with ASP/IIS, but I'm not sure. You can always download it for free at microsoft.com. Here's an example (in JScript) of how to send the http and create an XML DOM object from the result:
    // create and send xml http request to Filemaker
    var my_http_request = new ActiveXObject("Msxml2.XMLHTTP");
    my_http_request.open("GET", url, false);
    my_http_request.send();

    // create an xmlDOM object to store return data
    var my_xml_dom = Server.CreateObject("MSXML2.DOMDoent");
    my_xml_dom.loadXML(my_http_request.responseText);
    Then you can walk the DOM and handle the data
    appropriately:var root = my_xml_dom.doentElement;

    var nodeList = root.childNodes;



    // loop through the nodes in the DOM

    for (var i = 0; i < nodeList.length; i++) {

    // get the current node's nodeName

    var nodeName = nodeList.item(i).nodeName;



    // loop through this node's child nodes

    var childNodes = nodeList.item(i).childNodes;

    for (var j = 0; j < childNodes.length; j++) {



    // loop through this node's attributes

    var attributeList = childNodes.item(j).attributes;

    for (var k = 0; k < attributeList.length; k++) {

    // get the current attribute name

    var attribute = attributeList.item(k).nodeName;

    }

    }

    }I suggest you walk the dom once and write the nodes and
    attributes to an object. Then, you can reference the object when you
    need data for input fields or populating lists, etc - instead of having
    to walk the tree over and over ;)



    BTW, this method is actually relatively fast. (Much, much faster than
    using ODBC to create ADODB record sets).



    Alternatively, you can use PHP, and use Chris Hansen's FX object class
    (free!) to handle all the http and xml. His object class is quite easy
    to use and abstracts the whole xml dom, so you just set and get
    properties from the object you instantiate from the FX class. You can
    download the FX class at [url]www.iviking.org[/url].



    Hope this helps!


    --
    Mariano Peterson


    Posted via [url]http://dbforums.com[/url]
    marianopeterson Guest

Similar Threads

  1. Replies: 2
    Last Post: February 16th, 07:05 PM
  2. Problems with FMPro - users exceeded
    By No-one in forum FileMaker
    Replies: 3
    Last Post: October 10th, 05:03 PM
  3. FMPro & Flash?
    By ROKKSTAR in forum FileMaker
    Replies: 3
    Last Post: October 8th, 04:58 PM
  4. XML abilities of FMPro 6 and other programs?
    By Jefferis Peterson in forum FileMaker
    Replies: 2
    Last Post: September 22nd, 06:39 PM
  5. newbie - FMPro Web Companion - no show
    By SAF-WAY RECYCLER in forum FileMaker
    Replies: 1
    Last Post: August 6th, 12:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139