Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
119 Points
334 Posts
May 01, 2012 05:16 PM|LINK
I have now rewritten the js code, but still have same problem. So its not the js.
var countryselected = "";
$(document).ready(function() { $("#ddl").change(function() { var strSelected = ""; $("#ddl option:selected").each(function() { strSelected += $(this)[0].value; });
countryselected = strSelected; var url = "/Dinners/mydll/" + countryselected;
sendit(url);
});
function sendit(url) { $.post(url, function(data) {}); } });
I still think its the routing thing
samarmir
Member
119 Points
334 Posts
Re: MVC dropdownlist onchange
May 01, 2012 05:16 PM|LINK
I have now rewritten the js code, but still have same problem. So its not the js.
var countryselected = "";
$(document).ready(function() {
$("#ddl").change(function()
{
var strSelected = "";
$("#ddl option:selected").each(function()
{
strSelected += $(this)[0].value;
});
countryselected = strSelected;
var url = "/Dinners/mydll/" + countryselected;
sendit(url);
});
function sendit(url)
{
$.post(url, function(data) {});
}
});
I still think its the routing thing