For my case, I use the jscript to resolve the problem. See the coding below
function XDocument::OnSubmitRequest(eventObj)
{
//The acutal filepath
//XDocument.UI.Alert("Location " + XDocument.URI);
var filepath, filename;
filepath = ...