Welcome to WebmasterWorld Guest from 50.17.114.227

Forum Moderators: open

Message Too Old, No Replies

javascript runtime error on a variable definition

     
7:35 pm on Apr 23, 2003 (gmt 0)

New User

10+ Year Member

joined:Feb 4, 2003
posts:18
votes: 0


The following javascript code give error can any body tell me why its giving me that error

function validateForm
{

var char = "0123456789."; <------------********ERROR is here it says runtime error ")" expected

var priceValue = myForm.price.value;
if (i=0; i<priceValue.length; i++)
{
if (priceValue.charAt(i)< 0 priceValue.charAt(i)> 9 )
{
if (priceValue.charAt(i)!= '.' priceValue.charAt(i)!= ',')
{
alert('please enter right amount');
false;
}
}
}
}

thanks
Dee

7:42 pm on Apr 23, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


you need to use parenthesis: function validateForm()

;)