Checking Browser Image Support for a Dynamic Text Replacement JavaScript Application
(Page 1 of 4 )
If you're looking for a thorough and accessible approach to making text-based elements of your web site slightly more attractive to visitors, you might be interested in learning the foundations of the text replacement technique. It is a robust JavaScript-driven method that dynamically substitutes the text nodes of selected text-based web page sections with appealing images.
Introduction
Welcome to the final tutorial of the series that began with "Dynamic Text Replacement with JavaScript." As described in the introductory paragraph, this series provides you with a friendly guide on how to develop a text replacement application with the assistance of JavaScript. You can easily adapt this application to suit the requirements of your particular web projects.
If you've read the two previous articles of this series, then you've learned the essentials for utilizing the text replacement approach. In those articles I demonstrated how to implement the approach to substitute the text nodes included into all the <h2> headers of a sample web page with a few simple images.
Regardless of the simplicity of these practical examples, they did show in a nutshell the remarkable potential for using text replacements. They're especially useful when you want or need to use special font types in the heading sections of your web site, and you're looking for a way to expand beyond the ones embedded by default on many modern browsers.
Now that you're hopefully very familiar with utilizing the text replacement approach in your own web pages, let me offer you a quick introduction to the topics that I plan to cover in this last part of the series. This will help you to visualize how this last installment links with the others.
Since in the preceding article I already showed you how to modify the original text replacement application to make it suitable to use with any web page element, in this final chapter I'll incorporate some additional improvements to the application. Specifically, I'm going to provide it with the capacity to check whether or not the browser in which the text replacement process will take place supports images.
Although this tiny modification may seem insignificant, it will contribute to making the whole text replacement application slightly more robust and professional. Thus, having introduced the subject of this last part of the series, it's time to see how to add image support checking to the text replacement script that you learned in the previous article.
Are you ready to see how this will be achieved? Start reading now!
Next: Reviewing the previous text replacement application >>
More JavaScript Articles
More By Alejandro Gervasio