berkeleyguy Posted October 1, 2014 Share Posted October 1, 2014 On Page 344, right after on page 343 at the very end it states "as a practical example of this, let's return to the idea of linking some text to the browser's Back button, via the window.history.back() method", the following code appears: Please <span id=backSpan">go back</span> to the previous window and do what needs to be done. window.onload = function() { if (typeof window.print == 'function') { var backSpan = document.getElementById('backSpan'); backSpan.onclick = function() { window.print(); } } }; Shouldn't the window.print(); be replaced with "window.history.back()", given that page 343 at the end mentions using an example of window.history.back(), not of window.print(); ? Thank you for your help in advance, Alexander Link to comment Share on other sites More sharing options...
Larry Posted October 2, 2014 Share Posted October 2, 2014 Yeah, that's a mistake on my part. Apologies for that and thanks for bringing it up. I'll look into getting that corrected. Link to comment Share on other sites More sharing options...
Recommended Posts