Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'javascript book'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Hi Larry A topic I would like to see in your JavaScript book is multidimensional arrays. As I want to know how to add, update and delete an array of JavaScript custom objects. It would therefore be good to see a specific example of this in your book. Why you may well ask? Recently, I have been attempting to modify a nutrition program that I found on the internet to this end but to no avail. The JavaScript nutrition program I am referring to adds up all the various totals for eight nutrient values including protein, fats and carbohydrates from the various food groups - very useful for the health conscious. This also involves a user selecting the amount for each food item from a drop down list. Anyway, here is part of the list of array objects: foodgroup[1]=new food("Apple Juice",15,0,0,59,0,125,1,3); foodgroup[2]=new food("Prune Juice",24,0,0,99,3,301,1,4); foodgroup[3]=new food("Grapefruit Juice",11,0,0,44,0,208,1,2); foodgroup[4]=new food("Cranberry Juice",19,0,0,76,0,15,1,3); - - foodgroup[101]=new food("Vegetable Oil 8.1 cal/cc",0,0,27,2430,0,0,0,0); The problem that I have discovered occurs when you want to change the data structures in the list of array objects in anyway. If you want to add a food group, delete a food group that you don’t eat anymore or change the nutirent data values themselves with more accurate data, it can become a very cumbersome and tedious process. It can take a fair while, even hours and days especially if you have 29 nutrients or more! This could be expedited in my opinion with the inclusion of add, update and delete buttons within the user interface itself. Nevertheless, this nutrition program uses JavaScript coding like document.write to output results. You mentioned in one of your articles that this is “bad code, bad JavaScript“ but I have found it to be a very useful program despite it limitations in terms of changing the code to increase the number of nutrients etc. You can see this JavaScript program I am referring to hereby just pasting the following link in your browser: http://www.nafwa.org...d-software.html and then download the file NUTRIENT.ZIP Regards
×
×
  • Create New...