Hey I'm using the following script but its not working, I want to empty the region and city fields if the user didn't choose a country
function emptycountry()
{
var country=Xrm.Page.getAttribute("new_country");
var region=Xrm.Page.getAttribute("new_region");
var city=Xrm.Page.getAttribute("new_city");
if (Xrm.Page.getAttribute("new_country").getValue() = null)
{
Xrm.Page.getAttribute("new_region").setValue(null);
Xrm.Page.getAttribute("new_city").setValue(null);
}
alert(country);
else (Xrm.Page.getAttribute("new_country").getValue() != null)
{
Xrm.Page.getAttribute("new_region").setValue();
Xrm.Page.getAttribute("new_city").setValue();
}
}