Update Session data with Jquery
This is my first time posting so i hope i am in the right area. If not please point me to the right forum.
Okay so here is my issue:
First off I am using coldfusion and other languages are not an option.
I have a drop down box and users select a topic in that drop down box. Then it pops up a list of items that are within that topic and they can check as many as they like and then they click add and it ads it to a list all stored in a session. they can select as many topics and items as they like and it will add them to the session data.
I have implemented a drag and drop feature so they can arrange them how they like for a report. Here is where the issue is...
no mater how I arrange them when they run the report they are in the same order as when i added them and not the new order from the drag and drop. Any help would be useful.
here is my code for jquery i have now
- <script src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.4.2");
google.load("jqueryui", "1.8.2");
</script>
<style type="text/css">
#sortable { list-style-type: none; margin: 0; padding: 0; width: 100%; }
#sortable li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; height: 1.5em;border:solid 1px; }
html>body #sortable li { height: 1.5em; line-height: 1.2em; }
.ui-state-highlight { height: 1.5em; line-height: 1.2em; }
</style>
<script type="text/javascript">
$(function() {
$("#sortable").sortable({
placeholder: 'ui-state-highlight'
});
$("#sortable").disableSelection();
});
</script>
- Here is how i update and delete items from the session
- <cfif not Isdefined("session.program_cat_list") or NOT listLen(session.program_cat_list)>
<cfset session.program_cat_list = 0>
</cfif>
<cfif isdefined("form.submitted") and isdefined("form.programs_id") and ListLen(form.programs_id)>
<cfset session.program_cat_list = listAppend(session.program_cat_list,form.programs_id)>
</cfif>
<cfif isdefined("url.cut")>
<cfset session.program_cat_list = listDeleteAt(session.program_cat_list,listFind(session.program_cat_list,url.cut))>
</cfif>