WoW Gold - Natwest Credit Card - Loan - Web Hosting - Debt Consolidation

PDA

View Full Version : Javascript Validate a comma exists in a field


crm_user
May 15th 2008, 11:55 am
This is pretty simple (manager thinking, not me ) but I need to be able to validate that a field has a comma, that's it, that simple. How would I set this up?

chenyaniv
May 15th 2008, 12:28 pm
it shuold go somthing like that:

function check_comma(str)
{
if(str.indexof(",")==-1)
alert("insert a comma");
}