Edward 108 Posted September 25, 2012 Report Share Posted September 25, 2012 I went to the JS errata page but it didn't work, the javascript kept loading but didn't submit my comment. So i will post the comment here. On PG.253 words.js i changed from numbers to message for the script to work. Apart from that this book is awesome, i am just dieing now to be able to get javascript into my webpages. // Function for setting text of an element: function setText(elementId, message) { 'use strict'; if ( (typeof elementId == 'string') && (typeof message == 'string') ) { var output = $(elementId); if (output.textContent !== undefined) { output.textContent = message; } else { output.innerText = message; } } // End of main IF. } // End of setText() function. Quote Link to post Share on other sites
markifornia 3 Posted October 25, 2012 Report Share Posted October 25, 2012 Did you get this to work, it seems your post is more of a solution than a question? I also ran across this and noticed numbers was not a parameter of the function and wondered where it came from. Let me know if you still have any issues with it though. Quote Link to post Share on other sites
Edward 108 Posted October 25, 2012 Author Report Share Posted October 25, 2012 Yes it worked after the change i stated this point was mentioned in the errata. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.