robthewildman Posted May 23, 2021 Share Posted May 23, 2021 This is all so very frustrating - embarrassing! A simple little thing like string length, and I can't get it to work. Could you please help me? Here is the program below. I'm using classic asp / JavaScript. ------------------------- <%@ Language=JavaScript %> <HTML> <HEAD> <! http://ccs2468.com/test.asp > </HEAD> <% var str = "hello world"; strlen = str.length(); //← line 29 Response.Write("str= "+ str +" strlen= "+ strlen +" <br>" ); %> </body> </HTML> //This is the error message I get. Microsoft JScript runtime error '800a138a' Function expected /test.asp, line 29 Link to comment Share on other sites More sharing options...
dsonesuk Posted May 23, 2021 Share Posted May 23, 2021 In Javascript, It is a simple str.length. with braces it trying to run a function of that name. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now