If its the first time visiting the site and no querysting has been added or if there is only one querystring attached to the url '?hos' like http://hospitalsite/events/Pages/default.aspx?hos=somevalue, then i need to apply the if condition..the else condition is working fine..How do I check to see if there is a query
$(".hospitalDropDown").change(function(e){
currentURL=$(location).attr('href');
if((currentURL == 'http://hospitalsite/events/Pages/default.aspx' or (....)) {
window.location.href= 'http://hospitalsite/events/Pages/default.aspx'+'?hos='+$(this).val();
} else {
window.location.href = ( $(this).val() == "All Hospitals" ) ? 'http://hospitalsite/events/Pages/default.aspx': currentURL +'&hos='+ $(this).val();
}
});