Well, nevermind. I guess I figured out a solution. Just for reference, here is what I came up with. Most notable is the fact that I moved to the "Exit" event.
Taxpayer.#subform[0].Section1.TaxpayerSSN.fldTaxpayerSSN1::exit - (JavaScript, client)
var re = /^([0-6]\d{2}|7[0-6]\d|77[0-2])([ \-]?)(\d{2})\2(\d{4})$/;
if (!re.test(this.rawValue) && this.rawValue != null)
{
xfa.host.messageBox("Please enter a valid Social Security Number");
xfa.host.setFocus(this);
}
else
{
var temp = value;
if (value.indexOf("-") != -1)
{
temp = (value.split("-")).join("");
}
if (value.indexOf(" ") != -1)
{
temp = (value.split(" ")).join("");
}
if (temp.substring(0, 3) == "000")
{
xfa.host.messageBox("Please enter a valid Social Security Number");
xfa.host.setFocus(this);
}
if (temp.substring(3, 5) == "00")
{
xfa.host.messageBox("Please enter a valid Social Security Number");
xfa.host.setFocus(this);
}
if (temp.substring(5, 9) == "0000")
{
xfa.host.messageBox("Please enter a valid Social Security Number");
xfa.host.setFocus(this);
}
}
I borrowed and modified this code from this location:
http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256F6A0072B54C