Welcome to WebmasterWorld Guest from 54.163.35.238

Forum Moderators: open

Message Too Old, No Replies

javascript runtime error on a variable definition

     

dskaushik5

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

10+ Year Member



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

DrDoc

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

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



you need to use parenthesis: function validateForm()

;)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month