[jQuery] Re: Dynamically Populating Select Box

2007-10-31 Thread Snooze
Now I have the following code: (function($){ $.fn.selectCombo = function(url, target){ return this.each(function(){ var targetlabel = target.replace(/#/, ''); targetlabel = "[EMAIL PROTECTED]'" + targetlabel + "']"; $(this).change(function() { $.getJSON(url,{q: $(this).val()}, function(j){ var o

[jQuery] Re: Dynamically Populating Select Box

2007-10-31 Thread Snooze
Thanks for the links, I figured it out by looking at the implementation of Shelane's plugin. For reference. Here is my ASP code that returns the data in a JSON type structure: <% dim critset, json, cat cat = request("q") set critset = server.createobject("Adodb.recordset") sqlText = "SELECT DISTIN

[jQuery] Re: Dynamically Populating Select Box

2007-10-30 Thread Rob D
Hi Snooze, 1. Check out the following tutorials if you haven't already: http://remysharp.com/2007/01/20/auto-populating-select-boxes-using-jquery-ajax/ http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/ 2. Check out Shelane's plugin: http://code.google.com/p/jqueryselectcom

[jQuery] Re: Dynamically Populating Select Box

2007-10-30 Thread Wizzud
Yes, I got all that from the first post. If my previous post was no good at all to you then perhaps it's ASP you need help with, not jQuery? On Oct 30, 7:01 pm, Snooze <[EMAIL PROTECTED]> wrote: > Let me try to clarify what I am trying to accomplish. > > First I get a list of categories from the

[jQuery] Re: Dynamically Populating Select Box

2007-10-30 Thread Snooze
Let me try to clarify what I am trying to accomplish. First I get a list of categories from the database using ASP. Once the user selects a category, another select box populates with the available criteria for the user to select from. This criteria is also from the database and it is different f

[jQuery] Re: Dynamically Populating Select Box

2007-10-30 Thread Wizzud
There are several ways of doing it, depending on what you want your asp program to return. For example, assuming that your asp program will return the options as html, depending on the POSTed value of cat that it receives from the caller... var Cat = $('select.cat'); // first select Cat.change(f