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?
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,
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.
is working on a reply...