Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Carlos 338 posts 472 karma points
    Jan 27, 2012 @ 23:12
    Carlos
    0

    Persistent values in droplist using XSLT search

    I rigged the XSLT search to use my values I have in a droplist that match properties set by the admin.

    The thing is when a person uses the search or hits the search button the way I am doing it, the values are not persistent.

    I am using jQuery to generate the query to have the XSLT search on.

    Example is below for my jQuery

     $("#resourceSelect").click(function (event) { 
        var resourceGradeId = $('#teachersResourceSearchGrade').val();
         var resourceContentId = $('#teachersResourceSearchContent').val();
         var resourceProgramTypeId = $('#teachersResourceSearchProgramType').val(); 
        var resourceSearchAll = $('#teachersResourceSearchAll').val();
        window.location.href = '/teachers-v2/classroom-resources?search=' + resourceGradeId + ' ' + resourceContentId + ' ' + resourceProgramTypeId + ' ' + resourceSearchAll;
            });

    I do a window.location.href as you can see. But I need the values to persist in the droplist so they don't clear in my <select> droplist.  Can anyone help?

    Thanks,

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 28, 2012 @ 14:37
    Douglas Robar
    0

    Sounds like you'll need to further update the XSLTsearch.xslt file to look for and set the proper values from the querystring.

    FWIW, I think you'll need to use specific querystring parameters rather than just spaces since spaces won't be passed properly.

    window.location.href = '/teachers-v2/classroom-resources?search=' + resourceGradeId + '&rCId=' + resourceContentId + '&rPTId=' ....

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft