I am using jquery draggable and droppable functions. SO when an element is dropped an ajax call would be initiated passing parameters as query string. I know how to pass query string. But i need to do some conditional checking in query string parameters. I am not sure how it can be done. Please find my code below.
jQuery('#<%= qtr %>').droppable({
hoverclass: 'e_high',
accept: function(elm) {
if (jQuery(this).hasClass('<%=name%>_edit'))
return true;
},
drop: function() {
jQuery.ajax({
type: "POST",
url: '/sections/reorder?site_id=<%[email protected]%>&page=<%=@page%>?<%[email protected]%>:nil&ref_id=<%=section.id%>&name=<%=name%>'
Is the above method of passing query string correct. I am getting a No method error. Nil object. When i checked the terminal the params are Parameters: {"page"=>"", "site_id"=>"11650ecf55668fed9e7a624c93adcba2"}