Thanks for the imagebutton example, and I did try it even though I already knew it wasn't going to work for me - because I had already reported the imagebutton branching problem 3 weeks ago...
http://www.esp8266.com/viewtopic.php?f=42&t=9942We established that my script - which didn't work for me - did work ok for you if you modified my standard gpio01 pin to the appropropriate D4 of your nodeMCU. I asked what the Dpin prefix was all about, and was told to look in forlottos nodeMCU beginners guide, where I found out that the Dpin prefix is specific to the nodeMCU.
So unless the intended generic tutorial was to become another nodeMCU specific tutorial, that was the end of that.. and evidently still remains so.
It needed somebody else to independently disprove or confirm the symptoms I was reporting on non-nodeMCU hardware, else it's just me whinging about something that doesn't affect anyone else.