Previous Article
Coding Source Editor with AJAX
Ajax Tutorial: Dynamic Loading of ComboBox using jQuery and Ajax in ASP Classic
Next Article
Scrolling Page with ASP Classic And JQuery
Coding Article #: 33 - Published On: February 01, 2012 @ 16:07:23 PM - Last Updated on: July 13, 2012
This article has been Favorited 32 times
Join today, and add this to your favorites.
Coding Source - Share on MySpace Coding Source - Share With Facebook Coding Source - Share on Twitter Coding Source - Share on Reddit Coding Source - Share on Digg It Coding Source - Share on Stumble Upon It Coding Source - Share on Delicious
Share With Friends (Updated 6-8-2010)

Supported Files
File Download:
carrzkiss_040914Q_26498993.zip
File Size: 88.06 KB
Unzip with
Download winzip today!(OR)
Screenshot of Source Code
Coding Source - Ajax Tutorial: Dynamic Loading of ComboBox using jQuery and Ajax in ASP Classic
This code was originally written September 2010, and was assisted from Experts Exchange Volunteer "leakim971".

Using AJAX And JQery, we take the values from the first Selection box and populate the 2nd selection box without refreshing the page.
This is done primarily by use of Jquery.

Live Demo«


<script type="text/javascript">
    $(document).ready(function() {

        $('#loader').hide();
        $('#show_heading').hide();

        $('#search_category_id').change(function() {
            $('#show_sub_categories').fadeOut();
            $('#loader').show();
            $.get("ChildCats.asp", {
                parent_id: $('#search_category_id option:selected').val()
            }, function(response) {
                //alert(response); // we alert the response first for testing purpose
                setTimeout("finishAjax('show_sub_categories', '" + escape(response) + "')", 400);
            });
            return false;
        });

    });

    function finishAjax(id, response) {
        $('#loader').hide();
        $('#show_heading').show();
        $('#' + id).html(unescape(response));
        $('#' + id).fadeIn();
    }

    function alert_id() {
        if ($('#sub_category_id').val() == '')
            alert('Please select a sub category.');
        else
            alert($('#sub_category_id').val());
        return false;
    }
</script>

Post to Facebook about: Ajax Tutorial: Dynamic Loading of ComboBox using jQuery and Ajax in ASP Classic