I have been working with a form submission in joomla and have a few trouble using javascript variable with php JRoute_
Here is the code snippet:
function ValidateForm()
{
var loc = $("#locality").val();
var action = '<?php echo JRoute::_('index.php?option=com_add&view=malllists&Itemid=233&districtname='.$dit.'&loc='Pass javascript Variable Here) ;?>';
document.miniSurveyView481.action = action;
}
In the place of Pass javascript Variable Here I need to pass the loc value I tried plenty of things but Could not find a solution.