Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Comparing two strings?


Fotiman - 6:07 pm on May 15, 2012 (gmt 0)


Note also, I kept the reference to parseStr, assuming you have this defined somewhere. This also could have been rewritten as:

function compare() {
var first = document.getElementById('InvoiceEmail').value,
second = document.getElementById('ValInvoiceEmail').value,
result = document.getElementById('EmailCompareResult');
result.innerHTML = (parseStr(first) != parseStr(second)? 'Error': 'Okay');
}


Thread source:: http://www.webmasterworld.com/javascript/4453842.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com