Sure can, Rick! Here's the options var that gets created for the auto-suggest. http://jsbin.com/enita/edit
In it, you'll see the callback function that gets fired when a user clicks their entry after searching for something. You can see where I built the HTML string for the list item element containing the select element to choose a quantity, as well as a link back to the original PDF document (haven't implemented that yet) and a brief description. On Apr 8, 8:22 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote: > > I don't think I can incrementally increase a > > the ID/name of the select by 1. > > There are a couple of ways to do that. > Can you show me an example of the select that > you'd like to use and how the options would need > to increment? > > Rick > > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Kinsbane > Sent: Wednesday, April 08, 2009 11:11 PM > To: jQuery (English) > Subject: [jQuery] Re: generate AJAX data based on number of select elements > > Thanks for the reply Rick. I'm just barely starting to get started > with jQuery and AJAX in general, and while PHP wasn't terribly hard to > pick up, > I'm always trying to find the proper flow of logic to do things with > JavaScript. > Generally I try and find a loose example of what I want that someone > else did, and adapt it to my needs by trial and error - I always seem > to learn best that way. > But this particular thing I don't think I've seen before and I don't > know the first place to look for an example. It's pretty baffling. > My other thought was to pre-define 15 or so selects in the data stream > for the AJAX request and only include in the literature request those > select ID's that have values.. > The problem there is, when a person selects a piece of literature, I'm > not looping anything so I don't think I can incrementally increase a > the ID/name of the select by 1. > Or can I? > > On Apr 8, 6:48 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote: > > I don't have a solution for you, but just wanted to let you > > know that I'm interested in this, as well. I'm planning > > to build a real estate search interface that works with ajax > > to return results to a calling page based on search choices > > made by users. > > > My thoughts were that I would just use various functions triggered > > by the check of a certain box, or a selection in a dropdown, etc., > > and all the search parameters would be scanned for their values > > with any change. I'm afraid that could get a little processor intensive, > > however, with all the constant processing and changing of parameters. > > > I thought perhaps some kind of acceptable delay after changes might > > allow users enough time to complete their search parameter changes before > > triggering an ajax request. > > > I don't know. I'm just in the "thinking about this" stage right now, but > > will need to begin designing something in the next few weeks. > > > But your idea of dynamically looping a group of variables based on class > > sounds interesting. Haven't thought of that before. > > > I'll have to check out the web2ajax you referenced. > > > Rick > > > -----Original Message----- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > > Behalf Of Kinsbane > > Sent: Wednesday, April 08, 2009 8:26 PM > > To: jQuery (English) > > Subject: [jQuery] generate AJAX data based on number of select elements > > > Okay, so I've been working with the Facebook Like autosuggest > thing:http://web2ajax.fr/2008/02/03/facebook-like-jquery-and-autosuggest-se. > .. > > gine/ > > > I've adapted it to my system to make a request system for whatever > > literature people want. They select something from the results, and a > > div (within a form) gets populated with a li and a select box with the > > quantity they want of that piece of literature. > > > So I want to send this request to the server via AJAX/AHAH/AJAH > > whatever, but I don't know how to dynamically include the SELECT > > element's values into the data part of the $.ajax... I thought if > > maybe I did a var for the different data fields, I could just pass > > that one var to the $.ajax data option, but again, I'm stuck trying to > > figure out how I can loop through the select elements with classname > > of "litqty" and add them to the data var to pass to the $.ajax > > function > > $(function() { > > var reqData = { > > $('.litqty').each( > > //do something here to add it like this: > > unique-id-or-name-of-select: value-of-select > > ); > > } > > $("form#form_search_country").submit(function() { > > $.ajax('submitLitRequest.php', { > > data: reqData > > } > > ); > > }); > > > I hope that makes sense. Thanks in advance for any help !