Hello,
I am trying to have a JavaScript Alert box popup when a user clicks a button. Contained in the description of the popup box would be whatever was written in a textbox (field7). Field 7 is a string, however I get type mismatch with the following code:
XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2010-09-29T18:34:12" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"');
function CTRL16_5::OnClick(eventObj)
{
var field7 = XDocument.DOM.selectSingleNode("my:Main/my:myFields/my:field7");
XDocument.UI.Alert(field7); //This is the line that causes the type mismatch error
}
Programming Language: JavaScript
Application: Microsoft Office InfoPath 2003 SP3