<pre>-- This is one step up from the "SimpleGET" example.-- This one demonstrates searches with the GET method.-- But this time the form-element is a search-termon appleEvent class,event,sender  if class is "WWW" and event is "sdoc" then    request appleEvent data with keyword "kfor"    put parse(it) into searchTerm    reply HTTP() & myResponsePage(searchTerm)  else    pass appleEvent  end ifend appleEventfunction parse postData  set itemDelimiter to "="  return item 2 of postDataend parsefunction HTTP  put (the numToChar of 13) & (the numToChar of 10) into crlf  put "HTTP/1.0 200 OK" & crlf after header  put "Server: MacHTTP" & crlf after header  put "MIME-Version: 1.0" & crlf after header  put "Content-type: text/html" & crlf & crlf after header  return headerend HTTPfunction myResponsePage searchTerm  put "Hello World" into title  put searchFor(searchTerm) into content  return "<html><head><title>" & title & "</title></head><body>" & content & "</body></html>end myResponsePage---------------------- PICK ONE OF THE FOLLOWING: ------------------------ Assumes that search-terms are mapped to card-names.function searchFor searchTerm  if there is not a card searchTerm then return "Nothing found"  return fld "content" of card searchTermend searchFor-- Assumes that search-terms are mapped to card-names.-- Assumes that card contains the "searchResultsHTML" function.function searchFor searchTerm  if there is not a card searchTerm then return "Nothing found"  go to card searchTerm  return searchResultsHTML()end searchFor-- Finds all cards that match search criteria.-- Builds results page from field(s) of those found cards.function searchFor searchTerm  unmark all cards  mark cards where searchTerm is in field "name"  if the number of marked cds is 0 then return "Nothing found"  repeat with x = 1 to the number of marked cds    put "<br>" & (field "something" of marked cd x) & return after results  end repeat  return resultsend searchFor</pre>