Edward Posted September 25, 2012 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. Link to comment Share on other sites More sharing options...
markifornia Posted October 25, 2012 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. Link to comment Share on other sites More sharing options...
Edward Posted October 25, 2012 Author Share Posted October 25, 2012 Yes it worked after the change i stated this point was mentioned in the errata. Link to comment Share on other sites More sharing options...
Recommended Posts