Many people know about the $PaperColor field that allows you to change the background of a document. The drawbacks are that you have to close and re-open the document to see the change. Also, you are stuck with the 239 (or so) color numbers. This tip allows you to change it on the fly by choosing the color on the form itself.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
- First, create a field of color type -- let's call the field DocColor.
document.bgColor = document.forms.DocColor.value.substr (2,6)
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Malcolm MacLeod. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.