Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

empty field that empty another fields-JavaScript

$
0
0

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();

}
}


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>