homepage Welcome to WebmasterWorld Guest from 54.166.116.36
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
javascript runtime error on a variable definition
dskaushik5

10+ Year Member



 
Msg#: 765 posted 7:35 pm on Apr 23, 2003 (gmt 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

 

DrDoc

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



 
Msg#: 765 posted 7:42 pm on Apr 23, 2003 (gmt 0)

you need to use parenthesis: function validateForm()

;)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved