[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

correct a line of code written by another EE expert

Posted on 2014-07-12
4
Medium Priority
?
178 Views
Last Modified: 2014-07-12
Line 75 on this page
http://roofgenius.com/test9.asp
inVal=inVal==Int(inVal)?Int(inVal):inVal;
was told (int) was giving an error
Found this on the web:

Int
Definition: At one stage it was planned that specific data types would be introduced into the Javascript language. int is one the data types that would have been able to be explicitly defined. To allow for this int was a reserved word. The plan to allow specific data types in Javascript no longer exists and int is therefore no longer on the reserved word list in the latest standards. Since many people still use earlier browsers where this was defined as a reserved word you should avoid using it.
How to correct it ?
0
Comment
Question by:isnoend2001
  • 2
4 Comments
 
LVL 21

Assisted Solution

by:Randy Poole
Randy Poole earned 1000 total points
ID: 40192248
inVal=inVal==Math.round(inVal)?Math.round(inVal):inVal;
0
 
LVL 13

Accepted Solution

by:
duncanb7 earned 1000 total points
ID: 40192249
use  parseInt()  to replace int()

Hope understand your question completely.if not, please point it out

Duncan
0
 

Author Closing Comment

by:isnoend2001
ID: 40192264
Thanks guys
0
 
LVL 13

Expert Comment

by:duncanb7
ID: 40192266
Thanks for your points

Have a nice day

Duncan
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question