code not working

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Daron
Forum Newbie
Posts: 11
Joined: Tue Oct 09, 2007 4:50 pm

code not working

Post by Daron »

This is just a snip of what I'm working on, but the problem I'm having is that when the code to the right of the || operands is gone, it works. What do I need to do to make it work?

Code: Select all

document.forms[0].onsubmit = function()
{
	if(this.elements['tax_id'].value.length < 9 || this.elements['tax_id'].value.match([^[:digit:]]))
			 {alert('Tax ID information is incorrect.')
			 return false;
			 }
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Maybe:

Code: Select all

|| this.elements['tax_id'].value.match(/^[:digit:]/))
(#10850)
Post Reply