Alpha Video Training
Results 1 to 4 of 4

Thread: AJAX Callback question

  1. #1
    VAR
    Real Name
    Mike Reed
    Join Date
    Apr 2000
    Location
    Phoenix, AZ
    Posts
    649

    Default AJAX Callback question

    I am trying to make an Ajax call back function work and I can't seem to figure it out. It is based on the example in the Demo app that ships with Alpha and is listed under the item called: AJAX_SuggestionList_dbf

    I'm trying to create a call back that will suggest names as the user types in data into a block.

    I have attached a text file that has the source code for the 2 a5w pages I created. I'm wondering if someone can take a look and see if there are any obvious errors. Since I'm new at this, anything could be obvious.

    The text has code for 2 pages with a separate line in CAPS to describe where the code begins.

    Thanks,
    Mike Reed
    Phoenix, AZ

  2. #2
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Re: AJAX Callback question

    Point 1.
    I always put this line in the .AJAX.a5w as well as the first line after <%A5
    dunno why but I do
    Code:
    Response.charset = "ISO-8859-1"

  3. #3
    VAR Pat Bremkamp's Avatar
    Real Name
    Pat Bremkamp
    Join Date
    Apr 2000
    Location
    Oregon, USA
    Posts
    2,595

    Default Re: AJAX Callback question

    Haven't done any testing, but this line looks odd:

    itbl = tbl.order("church","left(city," + len(churchName)+")=" + s_quote(churchName))

    not sure why you would be filtering based on the city field.

    Pat

  4. #4
    VAR
    Real Name
    Mike Reed
    Join Date
    Apr 2000
    Location
    Phoenix, AZ
    Posts
    649

    Default Re: AJAX Callback question

    Quote Originally Posted by Pat Bremkamp View Post
    Haven't done any testing, but this line looks odd:

    itbl = tbl.order("church","left(city," + len(churchName)+")=" + s_quote(churchName))

    not sure why you would be filtering based on the city field.

    Pat
    The Phoenix metro area includes many smaller cities and there are several churches with the same name, so we have to include a city so we can make sure we have the right church. For example, there are 5 churches with the name of American Lutheran Church, each in a different city. So when we ask a member which church they worship at, we have to list all five and include the city name so they can select the right one.
    Hope that makes sense.
    Mike Reed
    Phoenix, AZ

Similar Threads

  1. Example of Ajax Callback from Dialog
    By eboughey1 in forum Application Server Version 9 - Web/Browser Applications
    Replies: 3
    Last Post: 03-09-2009, 08:41 PM
  2. Ajax Callback Session Variable and Debugging
    By chris.hazeslip in forum Application Server Version 9 - Web/Browser Applications
    Replies: 6
    Last Post: 02-27-2009, 02:17 PM
  3. AJAX Callback syntax question
    By Steve Wood in forum Application Server Version 9 - Web/Browser Applications
    Replies: 7
    Last Post: 02-25-2009, 05:14 PM
  4. callback response format in AJAX
    By ColinJD in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 01-14-2009, 04:07 PM
  5. beginner question for AJAX grid demo
    By stickman in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 11-20-2008, 02:59 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
  •