D
Delnang
I have a field in my data source called FileName which is a concat of two
other fields. I want to use FileName as the default filename and have the
following Code in the Save code in the Form Options:
function XDocument::OnSaveRequest(eventObj)
{
var filePath = "file:///C:/";
var fileName =
XDocument.DOM.selectSingleNode("my:myFields/my:FileName").text;
XDocument.UI.SetSaveAsDialogFileName(fileName);
XDocument.UI.SetSaveAsDialogLocation(filePath);
eventObj.IsCancelled = eventObj.PerformSaveOperation();
if (eventObj.IsCancelled)
{
XDocument.UI.Alert("Save Cancelled");
}
else
{
XDocument.UI.Alert("Form saved");
}
eventObj.ReturnStatus = true;
}
I am using Jscript, InfoPath 2003 with SP2 - the error is:
The following error occurred:
Reference to undeclared namespace prefix: 'my'.
File:script.js
Line:4
Unspecified error
What am I doing wrong? Any suggestions?
Thanks,
Angie
other fields. I want to use FileName as the default filename and have the
following Code in the Save code in the Form Options:
function XDocument::OnSaveRequest(eventObj)
{
var filePath = "file:///C:/";
var fileName =
XDocument.DOM.selectSingleNode("my:myFields/my:FileName").text;
XDocument.UI.SetSaveAsDialogFileName(fileName);
XDocument.UI.SetSaveAsDialogLocation(filePath);
eventObj.IsCancelled = eventObj.PerformSaveOperation();
if (eventObj.IsCancelled)
{
XDocument.UI.Alert("Save Cancelled");
}
else
{
XDocument.UI.Alert("Form saved");
}
eventObj.ReturnStatus = true;
}
I am using Jscript, InfoPath 2003 with SP2 - the error is:
The following error occurred:
Reference to undeclared namespace prefix: 'my'.
File:script.js
Line:4
Unspecified error
What am I doing wrong? Any suggestions?
Thanks,
Angie