Danny Dunn and the Universal Glue

Danny Dunn and the Universal Glue is the fifteenth and final novel in the "Danny Dunn" series of juvenile science fiction/adventure books written by Raymond Abrashkin and Jay Williams. The book was first published in 1977.
Plot summary.
Professor Bullfinch develops a glue which is stronger than any known glue. He christens it "Irenium" in honor of Danny's friend and neighbor Irene. 
The Blaze Chemical Company, which built a factory after draining a swamp, has leaked a chemical into the water which may cause the local dam to break. Danny, Joe and Irene use a can of Irenium to patch up the dam. 
In a subplot, Danny also uses the glue as a form of protest against Mr. Blaze by placing it on the backseat of his vehicle, causing Mr. Blaze to be stuck to the seat and having to cut his trousers apart, resulting in a humorous event where an angered Mr. Blaze appears at a town meeting to voice concerns over his chemical company wearing a blanket over his legs, giving the appearance of a kilt. 
Danny's mother, Mrs. Dunn, who originally protested the draining of the swamp, gives Danny a stern rebuke that the prank was immature and counterproductive, and that Danny is now required to make restitution, meaning he is now in debt to Mr. Blaze to pay for a new pair of men's trousers. Danny humbly sends a letter to Mr. Blaze with all the cash he has on hand, apologizing for what he did with the promise to work out a payment plan. 
During Danny's birthday party, a surprise guest is Mr. Blaze, who commends Danny for saving the town's dam and that his company will now have tougher oversight on chemical waste. He returns Danny his money, saying, "I guess a pair of pants was worth the lesson."
Editions.
McGraw-Hill
MacDonald and Jane's
Archway Books
Pocket Books