Got a requirement which needs to get advance find fetch xml on a ribbon button.
Here is the script to get advance find FetchXml on ribbon button click
function getAdvfindXml()
{
var fetchXml = document. all.namedItem("FetchXml").value;
alert(fetchXml);
}
Use the advance find xml accordingly.
Hope helps :)
Note: Above script completely unsupported.